Add coverage_report keyword in CI reports
What does this MR do and why?
Introduce a new CI config for coverage report. This sets up for more supported coverage report formats.
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
This new config is intended to replace artifacts:reports:cobertura
as we intend to add more coverage formats. For that reason, CI config must only contain either cobertura
or coverage_report
, not both.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
Given the following yaml:
test:
script:
- echo "stub report" > cobertura.xml
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: cobertura.xml
The job should run successfully and uploads the report as artifact:
How to set up and validate locally
- Create a new project with CI config that produces a cobertura report
- Run a pipeline on the project.
- Validate that the runner uploads the correct report as artifact.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #344533 (closed)
Edited by Albert