Problem to solve
Gitlab is not calculating code coverage change in case pipeline is not executed on every push.
Code coverage from the pipeline is displayed, but it does not show it is increased or decreased. That triggers the rule of “code coverage approval” for the MR.
Steps to reproduce
Pretty easy, just add a rule to the unit test phase, which will make that stage to execute only if those conditions are met:
rules:
- if: ‘$CI_PIPELINE_SOURCE == “merge_request_event” && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == “master”’
Configuration
No change of configuration needed. Actually, the only change I made, was that “rules” section, and code coverage change was broken.
Coverage report not showing anything in pipeline run - #8 by shorif2000 - that report very well describes what I am facing, I do not know why you quickly disregarded it.
Versions
Please select whether options apply, and add the version information.
Versions
- GitLab (Web:
/help
or self-managed system information): - GitLab Runner, if self-hosted (Web
/admin/runners
or CLIgitlab-runner --version
):
Helpful resources
Thanks for taking the time to be thorough in your request, it really helps!