File tree Expand file tree Collapse file tree 6 files changed +17
-37
lines changed Expand file tree Collapse file tree 6 files changed +17
-37
lines changed Original file line number Diff line number Diff line change 87
87
needs : build_test_lint # Run after the build job
88
88
runs-on : ubuntu-latest # GMD requires Linux runner with KVM
89
89
timeout-minutes : 60
90
+ strategy :
91
+ matrix :
92
+ api-level : [26, 34]
90
93
91
94
steps :
92
95
- name : Delete unnecessary tools 🔧
@@ -115,20 +118,24 @@ jobs:
115
118
116
119
- name : Setup Gradle
117
120
uses : gradle/actions/setup-gradle@v4
118
- # Add cache-encryption-key if you set up the GRADLE_ENCRYPTION_KEY secret
119
- # with:
120
- # cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
121
121
122
122
- name : Grant execute permission for gradlew
123
123
run : chmod +x gradlew
124
124
125
- - name : Run instrumentation tests (Gradle Managed Device)
126
- run : ./gradlew pixel5DebugAndroidTest
125
+ - name : Build projects and run instrumentation tests
126
+ uses : reactivecircus/android-emulator-runner@v2
127
+ with :
128
+ api-level : ${{ matrix.api-level }}
129
+ arch : x86_64
130
+ disable-animations : true
131
+ disk-size : 6000M
132
+ heap-size : 600M
133
+ script : ./gradlew connectedDebugAndroidTest --daemon
134
+
127
135
128
136
- name : Upload test reports
129
137
if : ${{ !cancelled() }}
130
138
uses : actions/upload-artifact@v4
131
139
with :
132
- name : test-reports-gmd-pixel5
133
- # GMD reports are typically in a path like this, adjust if needed
134
- path : ' **/build/outputs/androidTest-results/managedDevice/'
140
+ name : test-reports-${{ matrix.api-level }}
141
+ path : ' **/build/reports/androidTests'
Original file line number Diff line number Diff line change @@ -46,13 +46,6 @@ android {
46
46
47
47
testOptions {
48
48
targetSdk = 36
49
- managedDevices.allDevices {
50
- create(" pixel5" , com.android.build.api.dsl.ManagedVirtualDevice ::class .java) {
51
- device = " Pixel 5"
52
- apiLevel = 30
53
- systemImageSource = " aosp"
54
- }
55
- }
56
49
}
57
50
}
58
51
Original file line number Diff line number Diff line change @@ -52,14 +52,6 @@ android {
52
52
53
53
}
54
54
targetSdk = 36
55
-
56
- managedDevices.allDevices {
57
- create(" pixel5" , com.android.build.api.dsl.ManagedVirtualDevice ::class .java) {
58
- device = " Pixel 8"
59
- apiLevel = 30
60
- systemImageSource = " aosp"
61
- }
62
- }
63
55
}
64
56
}
65
57
Original file line number Diff line number Diff line change @@ -46,13 +46,6 @@ android {
46
46
47
47
testOptions {
48
48
targetSdk = 36
49
- managedDevices.allDevices {
50
- create(" pixel5" , com.android.build.api.dsl.ManagedVirtualDevice ::class .java) {
51
- device = " Pixel 5"
52
- apiLevel = 30
53
- systemImageSource = " aosp"
54
- }
55
- }
56
49
}
57
50
}
58
51
Original file line number Diff line number Diff line change @@ -47,13 +47,6 @@ android {
47
47
48
48
testOptions {
49
49
targetSdk = 36
50
- managedDevices.allDevices {
51
- create(" pixel5" , com.android.build.api.dsl.ManagedVirtualDevice ::class .java) {
52
- device = " Pixel 5"
53
- apiLevel = 30
54
- systemImageSource = " aosp"
55
- }
56
- }
57
50
}
58
51
}
59
52
Original file line number Diff line number Diff line change 6
6
# http://www.gradle.org/docs/current/userguide/build_environment.html
7
7
# Specifies the JVM arguments used for the daemon process.
8
8
# The setting is particularly useful for tweaking memory settings.
9
+ org.gradle.caching =true
10
+ org.gradle.parallel =true
9
11
org.gradle.jvmargs =-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx4g -Xms4g
10
12
# When configured, Gradle will run in incubating parallel mode.
11
13
# This option should only be used with decoupled projects. For more details, visit
You can’t perform that action at this time.
0 commit comments