diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 000000000..84c454bcb --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,76 @@ +name: PR +on: [ pull_request ] +jobs: + detekt: + runs-on: ubuntu-latest + name: Detekt + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: detekt + run: | + ./gradlew clean detekt + + assemble-debug-apk: + needs: [ detekt ] + name: Assemble Debug APK + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Assemble Debug APK + run: bash ./gradlew sample:assembleDebug + - name: Upload app APK + uses: actions/upload-artifact@v1 + with: + name: apk + path: sample/build/outputs/apk/debug/sample-debug.apk + + assemble-debug-android-test-apk: + needs: [ detekt ] + name: Assemble Instrumental APK + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Assemble Instrumental APK + run: bash ./gradlew sample:assembleDebugAndroidTest + - name: Upload app APK + uses: actions/upload-artifact@v1 + with: + name: apk + path: sample/build/outputs/apk/androidTest/debug/sample-debug-androidTest.apk + + firebase-lab-test: + needs: [ assemble-debug-apk, assemble-debug-android-test-apk ] + name: Firebase Instrumental API + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + api: [ 26, 27, 28, 29, 30, 31, 32, 33 ] + steps: + - uses: actions/checkout@v1 + - name: Download APKs + uses: actions/download-artifact@v1 + with: + name: apk + - name: Run tests on Firebase Test Lab for API ${{ matrix.api }} + uses: vacxe/firebase-test-lab-action@0.0.5 + with: + app: apk/sample-debug.apk + test: apk/sample-debug-androidTest.apk + device-id: MediumPhone.arm + os-version-id: ${{ matrix.api }} + num-flaky-test-attempts: 4 + env: + SERVICE_ACCOUNT: ${{ secrets.FIREBASE_TESTLAB_JSON }} diff --git a/.github/workflows/pr-project-check.yml b/.github/workflows/pr-project-check.yml deleted file mode 100644 index 643b20136..000000000 --- a/.github/workflows/pr-project-check.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: pull_request-check -on: [ pull_request ] -jobs: - detekt: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: detekt - run: | - ./gradlew clean detekt diff --git a/.github/workflows/pr-sample-connected-checks.yml b/.github/workflows/pr-sample-connected-checks.yml deleted file mode 100644 index a2548deab..000000000 --- a/.github/workflows/pr-sample-connected-checks.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: sample-connected-checks -on: [ pull_request ] -jobs: - integration-test: - runs-on: macOS-latest - strategy: - fail-fast: false - matrix: - api: [ 24, 25, 26, 28, 29, 30, 31, 32, 33 ] - abi: [ x86_64 ] - include: - - api: 27 - abi: x86 - steps: - - uses: actions/checkout@v1 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - uses: malinskiy/action-android/install-sdk@release/0.1.1 - - name: connectedCheck - uses: malinskiy/action-android/emulator-run-cmd@release/0.1.1 - timeout-minutes: 30 - with: - cmd: ./gradlew connectedCheck - cmdOptions: -no-snapshot-save -noaudio -no-boot-anim -cores 2 -memory 3072 -no-window -gpu swiftshader_indirect - api: ${{ matrix.api }} - tag: google_apis - abi: ${{ matrix.abi }} diff --git a/buildsystem/debug.keystore b/buildsystem/debug.keystore new file mode 100644 index 000000000..fb8f71a13 Binary files /dev/null and b/buildsystem/debug.keystore differ diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 8823cd849..77adeb16c 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -19,6 +19,19 @@ android { animationsDisabled = true } + signingConfigs { + create("kakao") { + storeFile = File("${project.rootDir}/buildsystem/debug.keystore") + storePassword = "android" + keyAlias = "kakaodebugkey" + keyPassword = "android" + } + } + + buildTypes { + debug { signingConfig = signingConfigs.getByName("kakao") } + } + sourceSets { getByName("main") { java.srcDir("src/main/kotlin") diff --git a/sample/src/androidTest/kotlin/io/github/kakaocup/sample/TestActivityTest.kt b/sample/src/androidTest/kotlin/io/github/kakaocup/sample/TestActivityTest.kt index abf46b3c4..916aa07aa 100644 --- a/sample/src/androidTest/kotlin/io/github/kakaocup/sample/TestActivityTest.kt +++ b/sample/src/androidTest/kotlin/io/github/kakaocup/sample/TestActivityTest.kt @@ -31,7 +31,6 @@ class TestActivityTest { } textViewLarge { - scrollTo() click() isVisible() hasText("LARGE") @@ -41,7 +40,6 @@ class TestActivityTest { } textViewSmall { - scrollTo() isVisible() hasText("small") isCompletelyBelow { @@ -50,13 +48,11 @@ class TestActivityTest { } textViewHint { - scrollTo() isVisible() hasHint("hint") } buttonViewLeft { - scrollTo() isVisible() hasText("left") isCompletelyLeftOf { @@ -65,7 +61,6 @@ class TestActivityTest { } buttonViewRight { - scrollTo() isVisible() hasText("right") isCompletelyRightOf { @@ -74,7 +69,6 @@ class TestActivityTest { } textViewSmall { - scrollTo() isVisible() hasText("small") isCompletelyBelow { @@ -83,46 +77,38 @@ class TestActivityTest { } textViewColored { - scrollTo() hasTextColor(R.color.background_color) } map { - scrollTo() click() hasAnyTag("test_tag", "non_test_tag") } multiTypeRecycler { - scrollTo() hasText("MULTI TYPE RECYCLER") } singleTypeRecycler { - scrollTo() hasText("SINGLE TYPE RECYCLER") } autoComplete { - scrollTo() hasText("AUTO_COMPLETE") } ratingbar { - scrollTo() hasRating(0f) setRatingAt(3f) hasRating(3f) } snackbarButton { - scrollTo() click() } snackbar { isDisplayed() - text { hasText("This is snackbar!") } action { hasText("DISMISS") @@ -134,14 +120,12 @@ class TestActivityTest { } seekbar { - scrollTo() hasProgress(70) dragProgressTo(30) hasProgress(30) } switch { - scrollTo() isChecked() click() isNotChecked() @@ -156,7 +140,6 @@ class TestActivityTest { } switchCompat { - scrollTo() isChecked() click() isNotChecked() @@ -175,7 +158,6 @@ class TestActivityTest { } searchView { - scrollTo() hasHint("This is the HINT!") hasHint(R.string.hint) typeQuery("Hello") diff --git a/sample/src/main/res/layout/activity_alert_dialog.xml b/sample/src/main/res/layout/activity_alert_dialog.xml index 2576032fa..297f12524 100644 --- a/sample/src/main/res/layout/activity_alert_dialog.xml +++ b/sample/src/main/res/layout/activity_alert_dialog.xml @@ -4,6 +4,11 @@ android:layout_height="match_parent" android:orientation="vertical"> + + +