Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try unified gradle test runner #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,8 @@ jobs:
script: echo "Generated AVD snapshot for caching."

- name: Run Android instrumented tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 23
arch: x86
profile: Nexus 5X
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: ./gradlew connectedCheck
run: |
./gradlew ui-home:pixel2api28DebugAndroidTest

publish-to-play-store:
name: Publish to Play Store
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.reactivecircus.streamlined

import com.android.build.api.dsl.ManagedVirtualDevice
import com.android.build.api.variant.ApplicationAndroidComponentsExtension
import com.android.build.api.variant.LibraryAndroidComponentsExtension
import com.android.build.gradle.TestedExtension
Expand All @@ -9,6 +10,7 @@ import org.gradle.api.JavaVersion
import org.gradle.api.Project
import org.gradle.api.tasks.testing.Test
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.kotlin.dsl.register
import org.gradle.kotlin.dsl.repositories
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPluginWrapper
Expand Down Expand Up @@ -57,10 +59,18 @@ internal fun TestedExtension.configureCommonAndroidOptions() {
resourceConfigurations.add("en")
}

testOptions.animationsDisabled = true

// TODO re-enable once lint analysis failure is fixed
lintOptions.disable("DialogFragmentCallbacksDetector")

testOptions {
animationsDisabled = true
devices.register<ManagedVirtualDevice>("pixel2api28") {
device = "Pixel 2"
apiLevel = 28
systemImageSource = "aosp"
abi = "x86"
}
}
}

/**
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ android.defaults.buildfeatures.renderscript=false
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false
android.library.defaults.buildfeatures.androidresources=false

# Enable Gradle managed virtual devices
android.experimental.androidTest.useUnifiedTestPlatform=true