@@ -30,31 +30,40 @@ jobs:
30
30
name : Library (Integration Tests)
31
31
runs-on : ubuntu-latest
32
32
steps :
33
- - name : Checkout
33
+ - name : checkout
34
34
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
43
38
run : |
44
39
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
45
40
sudo udevadm control --reload-rules
46
41
sudo udevadm trigger --name-match=kvm
47
- - name : Setup Gradle
42
+ - name : Gradle cache
48
43
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
52
62
uses : reactivecircus/android-emulator-runner@v2
53
63
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
56
67
disable-animations : true
57
- disk-size : 6000M
58
- heap-size : 600M
59
- script : ./gradlew connectedCheck --daemon
68
+ script : ./gradlew connectedCheck
60
69
0 commit comments