Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/AndroidCIWithGmd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Android CI with GMD

on:
push:
branches:
- main
pull_request:

jobs:

android-ci:
runs-on: macos-latest

steps:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- uses: actions/checkout@v2

- name: Run instrumented tests with GMD
continue-on-error: true
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

- name: Upload test reports
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: test-reports
path: |
'**/*/build/reports/androidTests/'
11 changes: 11 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ android {
unitTests {
isIncludeAndroidResources = true
}
// TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
managedDevices {
devices {
maybeCreate<com.android.build.api.dsl.ManagedVirtualDevice>("pixel4api30").apply {
device = "Pixel 4"
apiLevel = 30
// ATDs currently support only API level 30.
systemImageSource = "aosp-atd"
}
}
}
}
namespace = "com.google.samples.apps.nowinandroid"
}
Expand Down
1 change: 1 addition & 0 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ android {
experimentalProperties["android.experimental.self-instrumenting"] = true

testOptions {
// TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
managedDevices {
devices {
create<ManagedVirtualDevice>("pixel6Api31") {
Expand Down
14 changes: 14 additions & 0 deletions core/database/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ android {
testInstrumentationRunner = "com.google.samples.apps.nowinandroid.core.testing.NiaTestRunner"
}
namespace = "com.google.samples.apps.nowinandroid.core.database"

testOptions {
// TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
managedDevices {
devices {
maybeCreate<com.android.build.api.dsl.ManagedVirtualDevice>("pixel4api30").apply {
device = "Pixel 4"
apiLevel = 30
// ATDs currently support only API level 30.
systemImageSource = "aosp-atd"
}
}
}
}
}

dependencies {
Expand Down
14 changes: 14 additions & 0 deletions feature/bookmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ plugins {

android {
namespace = "com.google.samples.apps.nowinandroid.feature.bookmarks"

testOptions {
// TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
managedDevices {
devices {
maybeCreate<com.android.build.api.dsl.ManagedVirtualDevice>("pixel4api30").apply {
device = "Pixel 4"
apiLevel = 30
// ATDs currently support only API level 30.
systemImageSource = "aosp-atd"
}
}
}
}
}

dependencies {
Expand Down
14 changes: 14 additions & 0 deletions feature/foryou/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ plugins {

android {
namespace = "com.google.samples.apps.nowinandroid.feature.foryou"

testOptions {
// TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
managedDevices {
devices {
maybeCreate<com.android.build.api.dsl.ManagedVirtualDevice>("pixel4api30").apply {
device = "Pixel 4"
apiLevel = 30
// ATDs currently support only API level 30.
systemImageSource = "aosp-atd"
}
}
}
}
}

dependencies {
Expand Down
14 changes: 14 additions & 0 deletions feature/interests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,18 @@ plugins {
}
android {
namespace = "com.google.samples.apps.nowinandroid.feature.interests"

testOptions {
// TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
managedDevices {
devices {
maybeCreate<com.android.build.api.dsl.ManagedVirtualDevice>("pixel4api30").apply {
device = "Pixel 4"
apiLevel = 30
// ATDs currently support only API level 30.
systemImageSource = "aosp-atd"
}
}
}
}
}
14 changes: 14 additions & 0 deletions feature/settings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,18 @@ plugins {

android {
namespace = "com.google.samples.apps.nowinandroid.feature.settings"

testOptions {
// TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
managedDevices {
devices {
maybeCreate<com.android.build.api.dsl.ManagedVirtualDevice>("pixel4api30").apply {
device = "Pixel 4"
apiLevel = 30
// ATDs currently support only API level 30.
systemImageSource = "aosp-atd"
}
}
}
}
}
14 changes: 14 additions & 0 deletions feature/topic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ plugins {

android {
namespace = "com.google.samples.apps.nowinandroid.feature.topic"

testOptions {
// TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523)
managedDevices {
devices {
maybeCreate<com.android.build.api.dsl.ManagedVirtualDevice>("pixel4api30").apply {
device = "Pixel 4"
apiLevel = 30
// ATDs currently support only API level 30.
systemImageSource = "aosp-atd"
}
}
}
}
}

dependencies {
Expand Down