Minimum coverage for pipeline

Hi all,

I have several Go and Rust libraries, for which I need to set up code coverage. I am now able to see the current coverage for a specific job, by following the instructions here Pipeline settings | GitLab, but I can’t find a way to make the pipeline fail if, for example, the coverage is under 80%. Can anyone point me at a guide or reply here with details how to achieve this?

Thank you in advance, my saviour!


Hi @trixter89 - Thanks for the post and welcome to the forum!

I recorded a video last year to set this up with a bash script, it’s not great but it works.

The team is investigating now for the 14.0 or later milestone a way to do this within GitLab itself with MR approvals. You can follow the first issue in that epic here: Configure restricting coverage to raise or stay in a project (#15765) · Issues · / GitLab · GitLab

I hope this helps!

-James H, GitLab Product Manager, Verify:Testing