summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-07-21 01:28:53 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-09-27 17:13:32 +0200
commit0a234f320b3492cc8deb17aac71788bec272ec29 (patch)
treeaa11a6d8d81d474223fa88345fe8734860740be6
parent0cb6a9e41a740fd8a18a3f7c54b2852effc03892 (diff)
downloadmutter-0a234f320b3492cc8deb17aac71788bec272ec29.tar.gz
ci: Enable coverage report using cobertura format
This will allow to integrate coverage information with MR's diffs. See https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2515>
-rw-r--r--.gitlab-ci.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8116bb5d8..c24c5268f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -421,11 +421,20 @@ coverage:
- mkdir coveragereport
- gcovr --add-tracefile 'coverage-*.json'
--html-details --print-summary --output coveragereport/index.html
+ - gcovr --add-tracefile 'coverage-*.json'
+ --xml --output coveragereport/coverage.xml
artifacts:
expose_as: 'Coverage Report'
paths:
- coveragereport
- coveragereport/index.html
+ reports:
+ coverage_report:
+ coverage_format: cobertura
+ # TODO: we may need to split this file once it will reach the
+ # gitlab limit size of 10M, or it will stop working:
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/328772
+ path: coveragereport/coverage.xml
coverage: '/^lines: (\d+\.\d+\%)/'
needs:
- test-mutter@x86_64