Getting the Github all checks pass green mark even if CodeCov decreased

Is there a way to not make CodeCov decreases result in this red cross that Github displays? See figure for an example. All tests pass, documentation builds fine, but CodeCov coverage decreased by a few percent and now you get this ugly red cross on the Github repo page, instead of the nice green check mark. Is there a way to have Github ignore the CodeCov decrease when it decides whether to display a red cross or a green check mark?

image

(Actually in that figure there is still a running test, but ignore that).

You want to change the threshold, see the codecov docs: Status Checks

Here is how I have CodeCov setup for my packages:

.codecov.yml:

coverage:
  status:
    project:
      default:
        informational: true
    patch:
      default:
        informational: true
comment: false

I believe that the informational flag is what makes it a non-failing check.

1 Like