GitLab CI Kotlin DSL • opensavvy.gitlab.ci • Artifacts • coverage
coverage¶
Collects code coverage reports in Cobertura or JaCoCo formats.
The coverage report is uploaded to GitLab as an artifact. You can generate multiple JaCoCo or Cobertura reports and include them using wildcards - the results are aggregated in the final coverage report. The results appear in merge request diff annotations.
Coverage reports from child pipelines appear in merge request diff annotations, but the artifacts themselves are not shared with parent pipelines.
Example¶
val test by job {
script {
shell("./gradlew test jacocoTestReport")
}
artifacts {
coverage("cobertura", "build/reports/jacoco/test/jacocoTestReport.xml")
}
}