Skip to content

Commit

Permalink
Fixed stability of workflow instrumentation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LachlanMcKee committed Feb 9, 2023
1 parent b2b0cc7 commit 7df74df
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,38 +51,41 @@ jobs:
instrumentation-tests:
name: Instrumentation tests
runs-on: macOS-latest
timeout-minutes: 20
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- name: Pre build sources before launching emulator
run: ./gradlew compileDebugAndroidTestSources
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-31
- name: create AVD and generate snapshot for caching
key: avd-29
- 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: 31
# Use API 29 https://github.com/ReactiveCircus/android-emulator-runner/issues/222
api-level: 29
arch: x86_64
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: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
# Use API 29 https://github.com/ReactiveCircus/android-emulator-runner/issues/222
api-level: 29
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
Expand All @@ -94,7 +97,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v2
with:
name: instrumentation-failures-31
name: instrumentation-failures
path: |
**/build/reports
logcat.out
Expand Down

0 comments on commit 7df74df

Please sign in to comment.