Disable Paparazzi tasks when Kover is running. (#884)

* Disable Paparazzi tasks when Kover is running.

It allows us to split the test jobs between unit tests, screenshot test and coverage reports.

* Move Sonar upload to the quality workflow, since we have no lint info in tests.
This commit is contained in:
Jorge Martin Espinosa 2023-07-17 10:55:51 +02:00 committed by GitHub
parent e75438a8e3
commit 8865cc2b57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 18 deletions

View file

@ -28,6 +28,16 @@ android {
namespace = "io.element.android.tests.uitests"
}
// Workaround: `kover` tasks somehow trigger the screenshot tests with a broken configuration, removing
// any previous test results and not creating new ones. This is a workaround to disable the screenshot tests
// when the `kover` tasks are detected.
tasks.withType<Test>() {
if (project.gradle.startParameter.taskNames.any { it.contains("kover", ignoreCase = true) }) {
println("WARNING: Kover task detected, disabling screenshot test task $name.")
isEnabled = false
}
}
dependencies {
testImplementation(libs.test.junit)
testImplementation(libs.test.parameter.injector)