Add test coverage support with kcov
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: