Skip to content

WIP: Resolve "Fail build if coverage too low"

What does this MR do?

  • It adds two options to gitlab-ci.yml:

    global level: allowed_coverage_decline

    build level: minimum_coverage

allowed_coverage_decline

Is a value between 0 and 100. If it is given, the pipeline coverage will be compared to the last successful build in this branch or in the default branch. If the coverage declined more than the specified amount, the pipeline will fail.

minimum_coverage

Is a value between 0 and 100. If it is given, the build will fail if it's coverage is below this threshold.

Are there points in the code the reviewer needs to double check?

  • I don't know how to determine if all subjobs have finished for a build
  • I don't know how to tell the CI system, that the failed job shouldn't be retried automatically

Why was this MR needed?

It is part of my technical interview. (pinging @grzesiek , @ayufan )

Things I would have done if I had more time

  • changelog entry
  • specs for the pipeline part
  • integration test
  • documentation
  • ask someone about the TODOs

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #14974 (closed)

Edited by Udo Groebner

Merge request reports