add androidTest coverage data

This commit is contained in:
Milos Kozak 2023-10-21 21:17:52 +02:00
parent 6f78223c0b
commit cf2393a51c
2 changed files with 10 additions and 4 deletions

View file

@ -22,11 +22,11 @@ jobs:
- android/change-java-version:
java-version: 17
#- android/start-emulator-and-run-tests:
#system-image: system-images;android-29;google_apis;x86
- android/start-emulator-and-run-tests:
system-image: system-images;android-29;google_apis;x86
# Compile while the emulator starts to use the time.
#post-emulator-launch-assemble-command: ./gradlew compileFullDebugUnitTestSources database:impl:compileFullDebugAndroidTestSources
#test-command: ./gradlew database:impl:connectedFullDebugAndroidTest
post-emulator-launch-assemble-command: ./gradlew compileFullDebugUnitTestSources database:impl:compileFullDebugAndroidTestSources
test-command: ./gradlew database:impl:connectedFullDebugAndroidTest
- android/run-tests:
test-command: ./gradlew testFullDebugUnitTest

View file

@ -76,6 +76,12 @@ project.afterEvaluate {
it.add(path)
println("Collecting execution data from: $path")
}
val androidPath = "${proj.buildDir}/outputs/code_coverage/${variant}AndroidTest/connected/"
val androidFiles = fileTree(androidPath)
androidFiles.forEach { file ->
it.add(file.path)
println("Collecting android execution data from: ${file.path}")
}
}
}
}