CI: Add a test coverage job

This uses grcov internally to generate the HTML report.  We use grcov
instead of, say, lcov, because grcov actually generates accessible
pages.

We use the gnome-build-meta:core-nightly container image.  It doesn't
contain grcov by default, but we download the binary from its github
page.  We can change this later to build a custom container image for
gnome-calendar's own CI.

This will publish the report on

  https://gnome.pages.gitlab.gnome.org/gnome-calendar/coverage/
This commit is contained in:
Federico Mena Quintero
2025-05-26 18:13:55 -06:00
parent 9aa3497202
commit 9c7315a66a
4 changed files with 72 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
set -eux -o pipefail
export CFLAGS="-coverage -ftest-coverage -fprofile-arcs"
meson setup --buildtype=debug --prefix /usr _build .
meson compile -C _build
meson test -C _build