Skip to content

Add coverage support to CI

PBS requested to merge pbs3141/lib2geom:test_mr into master

Since unit testing is important in lib2geom, this MR adds coverage support to the library - that is, reporting how much of the codebase is actually tested by the test suite. This involves changes to both the build system and GitLab integration. The goal is to able to

  • Annotate MR diffs with line-by-line coverage information.

  • Show the coverage percentage on test jobs, MRs, and the homepage.

  • Generate HTML pages with line-by-line coverage information each time master is updated.

To confirm these features are working, I've temporarily included a test commit to demonstrate the MR diff annotation (now removed). The coverage percentage is already shown on this MR and its test jobs. However it's not yet shown on the homepage, because that needs Maintainer access to configure, so instead you'll have to go over to my fork to see what it'll look like. A preview of the HTML page is also reachable from there by clicking on the coverage indicator.

So the remaining tasks are:

  • After merging, ask someone with Maintainer access to add the badges to the homepage.
  • Rebase your open MRs on top of this and enjoy!
Edited by PBS

Merge request reports