From f014c948fd31d0bd87de6fecca277b699aded64a Mon Sep 17 00:00:00 2001 From: henneboy <72788863+henneboy@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:02:07 +0200 Subject: [PATCH 1/6] Add caching for emulator? --- .github/workflows/frontend.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 5786aa8e..4d6f8dbe 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -47,6 +47,23 @@ jobs: run: ./gradlew build -x test - name: Test (local) run: ./gradlew test + - name: AVD cache + uses: actions/cache@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + 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: ${{29}} + 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: Test (emulator) uses: reactivecircus/android-emulator-runner@v2 with: From b73c35f1648851c2b8b33c2007d07c95be9b1545 Mon Sep 17 00:00:00 2001 From: henneboy <72788863+henneboy@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:05:41 +0200 Subject: [PATCH 2/6] CI emulator test speed up --- .github/workflows/frontend.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 4d6f8dbe..668da392 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -69,6 +69,9 @@ jobs: with: api-level: 29 working-directory: ./frontend + 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: ./gradlew connectedCheck - name: Report uses: FlickerSoul/android-test-report-actions@v1.2 From 2770a5b08367c78a8f336a71e813ab94a2415c11 Mon Sep 17 00:00:00 2001 From: Henrik van Peet <72788863+henneboy@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:14:58 +0200 Subject: [PATCH 3/6] Update .github/workflows/frontend.yml Co-authored-by: Mads Mogensen --- .github/workflows/frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 668da392..65f42216 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -59,7 +59,7 @@ jobs: if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 with: - api-level: ${{29}} + api-level: 29 force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false From 34999501aa106fa86e072865d6183c6fb85282d5 Mon Sep 17 00:00:00 2001 From: Henrik van Peet <72788863+henneboy@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:15:04 +0200 Subject: [PATCH 4/6] Update .github/workflows/frontend.yml Co-authored-by: Mads Mogensen --- .github/workflows/frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 65f42216..edd79898 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -54,7 +54,7 @@ jobs: path: | ~/.android/avd/* ~/.android/adb* - key: avd-${{29}} + key: avd - name: Create AVD and generate snapshot for caching if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 From 361f325bb27564497ec0e737d865f74fec1d9e8c Mon Sep 17 00:00:00 2001 From: henneboy <72788863+henneboy@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:17:28 +0200 Subject: [PATCH 5/6] Update frontend.yml --- .github/workflows/frontend.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index a31841c5..0b3d1a84 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -64,7 +64,6 @@ jobs: emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false script: echo "Generated AVD snapshot for caching." - run: ./gradlew test -i - name: Test (emulator) uses: reactivecircus/android-emulator-runner@v2 with: From 5f738928c9fca4b9a45d72ff325e9595d3a4ef76 Mon Sep 17 00:00:00 2001 From: henneboy <72788863+henneboy@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:22:56 +0200 Subject: [PATCH 6/6] Update frontend.yml --- .github/workflows/frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 0b3d1a84..7eb742fb 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -46,7 +46,7 @@ jobs: - name: Build with Gradle run: ./gradlew build -x test - name: Test (local) - run: ./gradlew test -1 + run: ./gradlew test -i - name: AVD cache uses: actions/cache@v3 id: avd-cache