|
|
GitLab gives us the coverage report free of charge.
|
|
|
|
|
|
There are two places that we did in the Autosubmit case to have coverage. First we added a regular expression that gives a coverage number in one of our jobs of our CICD pipeline: https://earth.bsc.es/gitlab/es/autosubmit/-/blob/master/.gitlab-ci.yml#L32
|
|
|
|
|
|
![image](/uploads/827b1e7870d078c17c9d7c3e6cd1ffad/image.png)
|
|
|
|
|
|
Then, given we had a command already producing coverage report compatible with Cobertura format (here: https://earth.bsc.es/gitlab/es/autosubmit/-/blob/master/.gitlab-ci.yml#L31), we just had to use the `artifact` as you pointed: https://earth.bsc.es/gitlab/es/autosubmit/-/blob/master/.gitlab-ci.yml#L36-40
|
|
|
|
|
|
This `artifact` with a coverage report value gets used by GitLab to produce the diff in the merge requests. It normally takes a few seconds (1 minute?) for the coverage to appear on the merge request. And it only works if GitLab has a feature enabled (in the past they had it disabled by default due to performance).
|
|
|
|
|
|
![image](/uploads/a93780fd0b14d9bd94fe9f3e3364c466/image.png)
|
|
|
|
|
|
p.s.: we can archive other things in our pipelines, like XML files, Autosubmit configuration files, screenshots, etc., https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html |
|
|
\ No newline at end of file |