From 7df74df7170a7cc8e30fd87ff4ae9d8efb2832d0 Mon Sep 17 00:00:00 2001 From: Lachlan McKee Date: Thu, 9 Feb 2023 10:54:35 +0000 Subject: [PATCH] Fixed stability of workflow instrumentation tests --- .github/workflows/build.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1c3cd9a..d73ca214 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ 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 @@ -59,6 +59,9 @@ jobs: 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 @@ -66,23 +69,23 @@ jobs: 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 @@ -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