Skip to content

Add test coverage support with kcov

Massimo Zugno requested to merge rogueai/mkinitcpio:kcov into master

This MR adds support for test coverage to be displayed by gitlab. Coverage is generated with kcov and the resulting cobertura report uploaded as artifact.

I based pretty much everything on the excellent work already done in dbscripts, I however took the liberty of:

  • collapsing test and coverage in the same step, so that we only run bats once
  • adding a coverage regex in the pipeline, for coverage results to be parsed and displayed in gitlab's ui

Covered lines will show up for new MRs, and in the job's ui as percent covered: image

Merge request reports