File tree Expand file tree Collapse file tree 9 files changed +127
-0
lines changed
Expand file tree Collapse file tree 9 files changed +127
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Android CI with GMD
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ jobs :
10+
11+ android-ci :
12+ runs-on : macos-latest
13+
14+ steps :
15+ - uses : actions/setup-java@v3
16+ with :
17+ distribution : ' zulu'
18+ java-version : ' 11'
19+ - uses : actions/checkout@v2
20+
21+ - name : Run instrumented tests with GMD
22+ continue-on-error : true
23+ run : ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info
24+
25+ - name : Upload test reports
26+ if : success() || failure()
27+ uses : actions/upload-artifact@v3
28+ with :
29+ name : test-reports
30+ path : |
31+ '**/*/build/reports/androidTests/'
Original file line number Diff line number Diff line change @@ -73,6 +73,17 @@ android {
7373 unitTests {
7474 isIncludeAndroidResources = true
7575 }
76+ // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
77+ managedDevices {
78+ devices {
79+ maybeCreate< com.android.build.api.dsl.ManagedVirtualDevice > (" pixel4api30" ).apply {
80+ device = " Pixel 4"
81+ apiLevel = 30
82+ // ATDs currently support only API level 30.
83+ systemImageSource = " aosp-atd"
84+ }
85+ }
86+ }
7687 }
7788 namespace = " com.google.samples.apps.nowinandroid"
7889}
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ android {
6767 experimentalProperties[" android.experimental.self-instrumenting" ] = true
6868
6969 testOptions {
70+ // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
7071 managedDevices {
7172 devices {
7273 create<ManagedVirtualDevice >(" pixel6Api31" ) {
Original file line number Diff line number Diff line change @@ -34,6 +34,20 @@ android {
3434 testInstrumentationRunner = " com.google.samples.apps.nowinandroid.core.testing.NiaTestRunner"
3535 }
3636 namespace = " com.google.samples.apps.nowinandroid.core.database"
37+
38+ testOptions {
39+ // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
40+ managedDevices {
41+ devices {
42+ maybeCreate< com.android.build.api.dsl.ManagedVirtualDevice > (" pixel4api30" ).apply {
43+ device = " Pixel 4"
44+ apiLevel = 30
45+ // ATDs currently support only API level 30.
46+ systemImageSource = " aosp-atd"
47+ }
48+ }
49+ }
50+ }
3751}
3852
3953dependencies {
Original file line number Diff line number Diff line change @@ -21,6 +21,20 @@ plugins {
2121
2222android {
2323 namespace = " com.google.samples.apps.nowinandroid.feature.bookmarks"
24+
25+ testOptions {
26+ // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
27+ managedDevices {
28+ devices {
29+ maybeCreate< com.android.build.api.dsl.ManagedVirtualDevice > (" pixel4api30" ).apply {
30+ device = " Pixel 4"
31+ apiLevel = 30
32+ // ATDs currently support only API level 30.
33+ systemImageSource = " aosp-atd"
34+ }
35+ }
36+ }
37+ }
2438}
2539
2640dependencies {
Original file line number Diff line number Diff line change @@ -21,6 +21,20 @@ plugins {
2121
2222android {
2323 namespace = " com.google.samples.apps.nowinandroid.feature.foryou"
24+
25+ testOptions {
26+ // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
27+ managedDevices {
28+ devices {
29+ maybeCreate< com.android.build.api.dsl.ManagedVirtualDevice > (" pixel4api30" ).apply {
30+ device = " Pixel 4"
31+ apiLevel = 30
32+ // ATDs currently support only API level 30.
33+ systemImageSource = " aosp-atd"
34+ }
35+ }
36+ }
37+ }
2438}
2539
2640dependencies {
Original file line number Diff line number Diff line change @@ -20,4 +20,18 @@ plugins {
2020}
2121android {
2222 namespace = " com.google.samples.apps.nowinandroid.feature.interests"
23+
24+ testOptions {
25+ // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
26+ managedDevices {
27+ devices {
28+ maybeCreate< com.android.build.api.dsl.ManagedVirtualDevice > (" pixel4api30" ).apply {
29+ device = " Pixel 4"
30+ apiLevel = 30
31+ // ATDs currently support only API level 30.
32+ systemImageSource = " aosp-atd"
33+ }
34+ }
35+ }
36+ }
2337}
Original file line number Diff line number Diff line change @@ -21,4 +21,18 @@ plugins {
2121
2222android {
2323 namespace = " com.google.samples.apps.nowinandroid.feature.settings"
24+
25+ testOptions {
26+ // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
27+ managedDevices {
28+ devices {
29+ maybeCreate< com.android.build.api.dsl.ManagedVirtualDevice > (" pixel4api30" ).apply {
30+ device = " Pixel 4"
31+ apiLevel = 30
32+ // ATDs currently support only API level 30.
33+ systemImageSource = " aosp-atd"
34+ }
35+ }
36+ }
37+ }
2438}
Original file line number Diff line number Diff line change @@ -21,6 +21,20 @@ plugins {
2121
2222android {
2323 namespace = " com.google.samples.apps.nowinandroid.feature.topic"
24+
25+ testOptions {
26+ // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
27+ managedDevices {
28+ devices {
29+ maybeCreate< com.android.build.api.dsl.ManagedVirtualDevice > (" pixel4api30" ).apply {
30+ device = " Pixel 4"
31+ apiLevel = 30
32+ // ATDs currently support only API level 30.
33+ systemImageSource = " aosp-atd"
34+ }
35+ }
36+ }
37+ }
2438}
2539
2640dependencies {
You can’t perform that action at this time.
0 commit comments