[#394] Add robo test configuration
This commit is contained in:
parent
5e92e578cb
commit
f3b66797d3
|
@ -297,4 +297,4 @@ jobs:
|
|||
ORG_GRADLE_PROJECT_ZCASH_FIREBASE_TEST_LAB_API_KEY_PATH: ${{ steps.auth_test_lab.outputs.credentials_file_path }}
|
||||
run: |
|
||||
unzip ${BINARIES_ZIP_PATH}
|
||||
./gradlew :app:runFlankSanityConfig
|
||||
./gradlew :demo-app:runFlankSanityConfig
|
||||
|
|
|
@ -4,6 +4,7 @@ plugins {
|
|||
id("org.jetbrains.kotlin.android")
|
||||
id("kotlin-parcelize")
|
||||
id("androidx.navigation.safeargs")
|
||||
id("com.osacky.fladle")
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -74,3 +75,48 @@ dependencies {
|
|||
|
||||
implementation(libs.bundles.grpc)
|
||||
}
|
||||
|
||||
// Firebase Test Lab has min and max values that might differ from our project's
|
||||
// These are determined by `gcloud firebase test android models list`
|
||||
@Suppress("MagicNumber", "PropertyName", "VariableNaming")
|
||||
val FIREBASE_TEST_LAB_MIN_API = 23
|
||||
|
||||
@Suppress("MagicNumber", "PropertyName", "VariableNaming")
|
||||
val FIREBASE_TEST_LAB_MAX_API = 30
|
||||
|
||||
val firebaseTestLabKeyPath = project.properties["ZCASH_FIREBASE_TEST_LAB_API_KEY_PATH"].toString()
|
||||
if (firebaseTestLabKeyPath.isNotBlank()) {
|
||||
val minSdkVersion = run {
|
||||
val buildMinSdk =
|
||||
project.properties["ANDROID_MIN_SDK_VERSION"].toString().toInt()
|
||||
buildMinSdk.coerceAtLeast(FIREBASE_TEST_LAB_MIN_API).toString()
|
||||
}
|
||||
val targetSdkVersion = run {
|
||||
val buildTargetSdk =
|
||||
project.properties["ANDROID_TARGET_SDK_VERSION"].toString().toInt()
|
||||
buildTargetSdk.coerceAtMost(FIREBASE_TEST_LAB_MAX_API).toString()
|
||||
}
|
||||
|
||||
fladle {
|
||||
serviceAccountCredentials.set(File(firebaseTestLabKeyPath))
|
||||
|
||||
configs {
|
||||
create("sanityConfig") {
|
||||
clearPropertiesForSanityRobo()
|
||||
|
||||
debugApk.set(
|
||||
project.provider {
|
||||
"${buildDir}/outputs/apk/zcashmainnet/release/demo-app-zcashmainnet-release.apk"
|
||||
}
|
||||
)
|
||||
|
||||
testTimeout.set("5m")
|
||||
|
||||
devices.addAll(
|
||||
mapOf("model" to "NexusLowRes", "version" to minSdkVersion),
|
||||
mapOf("model" to "NexusLowRes", "version" to targetSdkVersion)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue