@@ -34,28 +34,49 @@ jobs:
34
34
35
35
ui-test :
36
36
name : UI tests on Android (API level ${{ matrix.api-level }})
37
- runs-on : macos -latest
37
+ runs-on : ubuntu -latest
38
38
strategy :
39
39
matrix :
40
- api-level : [ 26, 28, 34 ]
40
+ api-level : [ 26, 28, 33 ]
41
+ target : [ google_apis ]
42
+ arch : [ x86_64 ]
41
43
steps :
42
44
- name : Checkout
43
- uses : actions/checkout@v3
45
+ uses : actions/checkout@v4
44
46
45
- - name : Setup JDK 17
46
- uses : actions/setup-java@v3
47
+ - name : Enable KVM
48
+ run : |
49
+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
50
+ sudo udevadm control --reload-rules
51
+ sudo udevadm trigger --name-match=kvm
52
+
53
+ - name : Gradle cache
54
+ uses : gradle/actions/setup-gradle@v3
55
+
56
+ - name : AVD cache
57
+ uses : actions/cache@v4
58
+ id : avd-cache
47
59
with :
48
- java-version : ' 17'
49
- distribution : ' temurin'
50
- cache : gradle
60
+ path : |
61
+ ~/.android/avd/*
62
+ ~/.android/adb*
63
+ key : avd-${{ matrix.api-level }}
51
64
52
- - name : Setup Android SDK
53
- uses : android-actions/setup-android@v2
65
+ - name : Create AVD and generate snapshot for caching
66
+ if : steps.avd-cache.outputs.cache-hit != 'true'
67
+ uses : reactivecircus/android-emulator-runner@v2
68
+ with :
69
+ api-level : ${{ matrix.api-level }}
70
+ force-avd-creation : false
71
+ emulator-options : -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
72
+ disable-animations : false
73
+ script : echo "Generated AVD snapshot for caching."
54
74
55
- - name : UI test
75
+ - name : Run tests
56
76
uses : reactivecircus/android-emulator-runner@v2
57
77
with :
58
78
api-level : ${{ matrix.api-level }}
79
+ force-avd-creation : false
80
+ emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
59
81
disable-animations : true
60
- arch : x86_64
61
82
script : ./gradlew connectedCheck
0 commit comments