Skip to content

Commit 4f939c1

Browse files
committed
try more advanced
1 parent 3e79179 commit 4f939c1

File tree

1 file changed

+27
-18
lines changed

1 file changed

+27
-18
lines changed

.github/workflows/test.yml

+27-18
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,40 @@ jobs:
3030
name: Library (Integration Tests)
3131
runs-on: ubuntu-latest
3232
steps:
33-
- name: Checkout
33+
- name: checkout
3434
uses: actions/checkout@v4
35-
with:
36-
fetch-depth: 0
37-
- name: Configure JDK
38-
uses: actions/setup-java@v4
39-
with:
40-
distribution: 'adopt'
41-
java-version: '17'
42-
- name: Enable KVM group perms
35+
- name: Start Docker containers
36+
run: dev/up
37+
- name: Enable KVM
4338
run: |
4439
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
4540
sudo udevadm control --reload-rules
4641
sudo udevadm trigger --name-match=kvm
47-
- name: Setup Gradle
42+
- name: Gradle cache
4843
uses: gradle/actions/setup-gradle@v3
49-
- name: Start Docker containers
50-
run: dev/up
51-
- name: Gradle Run Integration Tests
44+
- name: AVD cache
45+
uses: actions/cache@v4
46+
id: avd-cache
47+
with:
48+
path: |
49+
~/.android/avd/*
50+
~/.android/adb*
51+
key: avd-29
52+
- name: create AVD and generate snapshot for caching
53+
if: steps.avd-cache.outputs.cache-hit != 'true'
54+
uses: reactivecircus/android-emulator-runner@v2
55+
with:
56+
api-level: 29
57+
force-avd-creation: false
58+
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
59+
disable-animations: false
60+
script: echo "Generated AVD snapshot for caching."
61+
- name: run tests
5262
uses: reactivecircus/android-emulator-runner@v2
5363
with:
54-
api-level: 30
55-
arch: x86_64
64+
api-level: 29
65+
force-avd-creation: false
66+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
5667
disable-animations: true
57-
disk-size: 6000M
58-
heap-size: 600M
59-
script: ./gradlew connectedCheck --daemon
68+
script: ./gradlew connectedCheck
6069

0 commit comments

Comments
 (0)