Make coverage CI jobs use BUNDLE_ONLY and not rely on main codebase
Context
Related to #416630 (closed).
First iteration of #416630 (comment 1474093453).
This iteration paves the way for a few future improvements for the rspec:coverage
job:
- Use a smaller, dedicated
coverage
gems cache, to only use the gems we need for Simplecov to function (downloading the cache takes~15s
) - Do not use
git clone
to fetch the codebase: fetch only the minimum amount of files required for Simplecov to function - Run the
scripts/merge-simplecov
script from any job as fast as possible (see iteration 3 of #416630 (comment 1474093453))
What does this MR do and why?
In this MR, we make the scripts/merge-simplecov
script independent of the gitlab-org/gitlab
codebase as much as we can.
We also introduce the BUNDLE_ONLY
env variable to replace BUNDLE_WITHOUT
, as it will then only load the gems we need for the coverage jobs to work.
Results
-
The pipeline is green, which means that:
- Coverage was generated for each RSpec jobs (e.g. download artifacts for https://gitlab.com/gitlab-org/gitlab/-/jobs/4753874798)
- If the folders inside the
coverage
folder of the artifacts look empty, look for hidden files!
- If the folders inside the
- Coverage reports were merged in
rspec:coverage
: https://gitlab.com/gitlab-org/gitlab/-/jobs/4753874811- This job displays a coverage score of
98.39%
- This job displays a coverage score of
- Coverage was generated for each RSpec jobs (e.g. download artifacts for https://gitlab.com/gitlab-org/gitlab/-/jobs/4753874798)
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.
Edited by David Dieulivol