-
Notifications
You must be signed in to change notification settings - Fork 1
Add compose test step to CI #98
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
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
dfabb8f
ci: add compose test step
jvsena42 41e00dc
ci: create a ui test workflow
jvsena42 9db3916
ci: add event
jvsena42 b9572a4
ci: only runs UI tests after CI success
jvsena42 cc6e3d6
ci: implement reactivecircus/android-emulator-runner@v2
jvsena42 6751b5c
ci: remove validation
jvsena42 ced10b9
ci: checks
jvsena42 05a7636
ci: checks
jvsena42 41bdb2c
ci: checks
jvsena42 b94c96f
ci: checks
jvsena42 8996cac
ci: checks
jvsena42 c1331ce
ci: checks
jvsena42 4ae378d
ci: checks
jvsena42 4166dfc
ci: checks
jvsena42 2b54f3b
ci: replace github action with docker
jvsena42 c8f2725
ci: replace github action with docker
jvsena42 4de09ec
ci: replace github action with docker
jvsena42 cfef548
ci: replace github action with docker
jvsena42 5be569a
ci: replace github action with docker
jvsena42 546f7d4
ci: emulator boot handling
jvsena42 f53c8aa
ci: replace docker with android emulator runner action
jvsena42 356c8d5
ci: replace docker with android emulator runner action
jvsena42 392008f
ci: replace docker with android emulator runner action
jvsena42 2192010
ci: replace docker with android emulator runner action
jvsena42 01c8059
ci: replace docker with android emulator runner action
jvsena42 9d6c37b
ci: replace docker with android emulator runner action
jvsena42 90fc8cc
fix: add arch x86_64 to debug builds
jvsena42 cf714e1
ci: trigger integration tests after unit tests
jvsena42 2463531
fix: add armeabi
jvsena42 6c27395
fix: remove success validation
jvsena42 f5fa682
fix: restore trigger
jvsena42 7748e29
fix: comment test
jvsena42 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| name: UI Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
|
|
||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| ui-tests: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout the code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'adopt' | ||
|
|
||
| - name: Cache gradle | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
| restore-keys: | | ||
| gradle-${{ runner.os }}- | ||
|
|
||
| - name: Decode google-services.json | ||
| run: echo "$GOOGLE_SERVICES_JSON_BASE64" | base64 -d > app/google-services.json | ||
| env: | ||
| GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }} | ||
|
|
||
| - name: Make gradlew executable | ||
| run: chmod +x gradlew | ||
|
|
||
| - name: Build for debug with gradle | ||
| run: | | ||
| ./gradlew assembleDebug assembleAndroidTest | ||
| ls -la app/build/outputs/apk/debug/ | ||
| ls -la app/build/outputs/apk/androidTest/debug/ | ||
|
|
||
| - name: Enable KVM | ||
| run: | | ||
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger --name-match=kvm | ||
|
|
||
| - name: AVD cache | ||
| uses: actions/cache@v4 | ||
| id: avd-cache | ||
| with: | ||
| path: | | ||
| ~/.android/avd/* | ||
| ~/.android/adb* | ||
| key: avd-30-x86_64 | ||
|
|
||
| - name: Create AVD and generate snapshot for caching | ||
| if: steps.avd-cache.outputs.cache-hit != 'true' | ||
| uses: reactivecircus/android-emulator-runner@v2 | ||
| with: | ||
| api-level: 30 | ||
| arch: x86_64 | ||
| profile: pixel_4 | ||
| force-avd-creation: false | ||
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
| disable-animations: false | ||
| script: echo "Generated AVD snapshot for caching." | ||
|
|
||
| - name: Run UI tests on Android Emulator | ||
| uses: reactivecircus/android-emulator-runner@v2 | ||
| with: | ||
| api-level: 30 | ||
| arch: x86_64 | ||
| profile: pixel_4 | ||
| force-avd-creation: false | ||
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
| disable-animations: true | ||
| script: | | ||
| # Wait for emulator to be fully ready | ||
| adb wait-for-device | ||
| echo "Waiting for boot to complete..." | ||
| adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done' | ||
| sleep 10 | ||
|
|
||
| # Verify emulator ABI matches app | ||
| echo "Emulator ABI:" | ||
| adb shell getprop ro.product.cpu.abi | ||
|
|
||
| # Install and run tests | ||
| ./gradlew installDebug | ||
| ./gradlew connectedDebugAndroidTest | ||
|
|
||
| - name: Upload UI test report | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: compose_test_report | ||
| path: | | ||
| app/build/reports/androidTests/connected/**/* | ||
| app/build/outputs/androidTest-results/connected/**/* | ||
| if-no-files-found: warn | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.