Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): migrate to firebase lab #89

Merged
merged 4 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -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 }}
14 changes: 0 additions & 14 deletions .github/workflows/pr-project-check.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/pr-sample-connected-checks.yml

This file was deleted.

Binary file added buildsystem/debug.keystore
Binary file not shown.
13 changes: 13 additions & 0 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class TestActivityTest {
}

textViewLarge {
scrollTo()
click()
isVisible()
hasText("LARGE")
Expand All @@ -41,7 +40,6 @@ class TestActivityTest {
}

textViewSmall {
scrollTo()
isVisible()
hasText("small")
isCompletelyBelow {
Expand All @@ -50,13 +48,11 @@ class TestActivityTest {
}

textViewHint {
scrollTo()
isVisible()
hasHint("hint")
}

buttonViewLeft {
scrollTo()
isVisible()
hasText("left")
isCompletelyLeftOf {
Expand All @@ -65,7 +61,6 @@ class TestActivityTest {
}

buttonViewRight {
scrollTo()
isVisible()
hasText("right")
isCompletelyRightOf {
Expand All @@ -74,7 +69,6 @@ class TestActivityTest {
}

textViewSmall {
scrollTo()
isVisible()
hasText("small")
isCompletelyBelow {
Expand All @@ -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")
Expand All @@ -134,14 +120,12 @@ class TestActivityTest {
}

seekbar {
scrollTo()
hasProgress(70)
dragProgressTo(30)
hasProgress(30)
}

switch {
scrollTo()
isChecked()
click()
isNotChecked()
Expand All @@ -156,7 +140,6 @@ class TestActivityTest {
}

switchCompat {
scrollTo()
isChecked()
click()
isNotChecked()
Expand All @@ -175,7 +158,6 @@ class TestActivityTest {
}

searchView {
scrollTo()
hasHint("This is the HINT!")
hasHint(R.string.hint)
typeQuery("Hello")
Expand Down
5 changes: 5 additions & 0 deletions sample/src/main/res/layout/activity_alert_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
android:layout_height="match_parent"
android:orientation="vertical">

<!--Firebase API 29 emulator showing "Device is managed by your organization pop-up and overlapping buttons"-->
<View
android:layout_width="match_parent"
android:layout_height="100dp" />

<Button
android:id="@+id/show_alert_dialog"
android:layout_width="match_parent"
Expand Down
Loading