Skip to content

Report test coverage % to GitLab instance

Jørgen Svennevik Notland requested to merge jQrgen/wally:ci_test_coverage into mp

Reports total code coverage % for jvm, android and common source sets to the GitLab instance

Uses the official kotlin coverage reporter Kover (ALFA) https://github.com/Kotlin/kotlinx-kover

Coverage is reported to GitLab from the codeCoveragePercent job with the following line:

coverage: '/application line coverage: ([0-9]+(?:\.[0-9]+)?)%/' # Reports coverage to GitLab

The regular expression reads the code coverage percentage from the ./gradlew koverLog logs and report it to GitLab

Job MR
Screenshot_2024-03-19_at_18.19.35 Screenshot_2024-03-19_at_18.20.08
Edited by Jørgen Svennevik Notland

Merge request reports