1
0
Fork 0

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>
This commit is contained in:
Marco Trevisan (Treviño) 2022-07-21 01:28:53 +02:00
parent 0cb6a9e41a
commit 0a234f320b

View file

@ -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