ci: Instrumentation tests coverage in ci.
Some checks failed
Check PR code / Lint (pull_request) Successful in 3m51s
Check PR code / translations (pull_request) Successful in 48s
Check PR code / EspressoReports (pull_request) Failing after 6m9s
Check PR code / build (pull_request) Successful in 16m44s

This commit is contained in:
2025-03-16 15:55:10 +01:00
parent 02d503e03a
commit b58cbc8be5
3 changed files with 84 additions and 5 deletions

View File

@ -96,6 +96,7 @@ android {
// tests
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments["clearPackageData"] = "true"
testInstrumentationRunnerArguments["useTestStorageService"] = "true"
}
packaging {
resources {
@ -109,6 +110,8 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
getByName("debug") {
isTestCoverageEnabled = true
enableAndroidTestCoverage = true
}
}
flavorDimensions.add("build")
@ -197,14 +200,15 @@ dependencies {
testImplementation("io.mockk:mockk:1.13.14")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1")
androidTestImplementation("androidx.test:runner:1.6.2")
androidTestImplementation("androidx.test:rules:1.6.1")
androidTestImplementation("androidx.test:runner:1.7.0-alpha01")
androidTestImplementation("androidx.test:rules:1.7.0-alpha01")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
implementation("androidx.test.espresso:espresso-idling-resource:3.6.1")
androidTestImplementation("androidx.test.ext:junit-ktx:1.2.1")
androidTestUtil("androidx.test:orchestrator:1.5.1")
androidTestUtil("androidx.test:orchestrator:1.6.0-alpha02")
androidTestUtil("androidx.test.services:test-services:1.6.0-alpha02")
testImplementation("org.robolectric:robolectric:4.14.1")
testImplementation("androidx.test:core-ktx:1.6.1")
testImplementation("androidx.test:core-ktx:1.7.0-alpha01")
implementation("ch.acra:acra-http:$acraVersion")
implementation("ch.acra:acra-toast:$acraVersion")