Skip to content

Add coverage_report keyword in CI reports

Albert requested to merge 344533-new-coverage_report-keyword into master

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:

Screenshot_2022-03-02_at_7.39.30_PM

How to set up and validate locally

  1. Create a new project with CI config that produces a cobertura report
  2. Run a pipeline on the project.
  3. 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.

Related to #344533 (closed)

Edited by Albert

Merge request reports

Loading