From 0a234f320b3492cc8deb17aac71788bec272ec29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 21 Jul 2022 01:28:53 +0200 Subject: [PATCH] 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: --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) 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