Skip to content

Commit 272021a

Browse files
author
Joseph Cooper
committed
ci: Enable caching for AVDs
Note workaround for ReactiveCircus/android-emulator-runner#319
1 parent 0295336 commit 272021a

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/data-integration-tests.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,27 @@ jobs:
4747
with:
4848
cache-read-only: false
4949

50+
- name: AVD cache
51+
uses: actions/cache@v3
52+
id: avd-cache
53+
with:
54+
path: |
55+
~/.android/avd/*
56+
~/.android/adb*
57+
key: avd-${{ matrix.api-level }}-${{ matrix.target-level }}
58+
59+
- name: create AVD and generate snapshot for caching
60+
if: steps.avd-cache.outputs.cache-hit != 'true'
61+
uses: reactivecircus/android-emulator-runner@v2
62+
with:
63+
profile: "Galaxy Nexus"
64+
api-level: ${{ matrix.api-level }}
65+
target: ${{ matrix.target }}
66+
force-avd-creation: false
67+
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
68+
disable-animations: false
69+
script: echo "Generated AVD snapshot for caching."
70+
5071
## Build before running tests
5172
- name: Build instrumented integration tests
5273
uses: gradle/gradle-build-action@v2
@@ -68,7 +89,8 @@ jobs:
6889
force-avd-creation: false
6990
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
7091
disable-animations: true
71-
script: ./gradlew :integration-tests:firebase:connectedCheck
92+
# Workaround for https://github.com/ReactiveCircus/android-emulator-runner/issues/319
93+
script: adb uninstall "com.omricat.maplibrarian.integration-testing.debug"; ./gradlew :integration-tests:firebase:connectedCheck
7294

7395
- name: Extract logs from firebase emulator container
7496
if: ${{ always() }}

0 commit comments

Comments
 (0)