How to make codecov branch status checks conditional

Description

I have the codecov/project and codecov/patch status
set as required for protected branches in GitHub.
I have tried every combination of the codecov.yml
settings to achieve the following:

  • If for a given commit coverage is uploaded
    all codecov checks must pass. If no coverage
    is uploaded the status checks should be set
    to “success” automatically. (IE. updating docs, README, etc).

In the codecov.yml reference
it says about the “if_not_found” setting:

" success : the status will pass if there is no report for the head. Use this on commits / PRs where you won’t be uploading coverage but still want codecov status checks to pass. "

So what I’m expecting is that codecov status checks
are set to success if no coverage is uploaded after
all actions are run. However, its always stays stuck
at "Expected — Waiting for status to be reported "

I’m thinking that maybe it has something to
do with “skipped” actions not being recognized as
completed.

CI/CD URL

(ci(monorepo): wait_for_ci = false, n_builds =1 by calvinalkan · Pull Request #112 · sniccowp/sniccowp · GitHub)

Codecov Output

No output. Uploading coverage is skipped for
changes outside of src/*.php

Expected Results

codcov/project and codecov/patch
should be set to true in the linked PR.

Actual Results

codcov/project and codecov/patch
are stuck waiting for a status to be reported.

Additional Information

This is the codecov.yml currently used for this PR.

But I tried every other imaginable combination.

hi @calvinalkan I’m not sure this is quite possible. I see that the if_not_found reference is misleading, as it is more specific to flags.

The reason that it’s still waiting on a status, is that Codecov is not made aware of the commit (since no uploads are sent up). So Codecov doesn’t send up notifications. A way around this would be to send up a blank coverage report.