If a project that has less than 100% coverage and some of the code that is covered is deleted codecov/project reports a decrease in coverage and sets the status as failed even if all the lines that are not covered were not covered before either. See this commit for example Update test_hello.py · hexagonrecursion/tmp-cc@a140892 · GitHub
It would be better to use the change in the number of lines not covered instead of the change in the coverage percentage to decide if the check should fail
Codecov will set the Project Status and Patch Status to success when it detects that the coverage was decreased due to the offset of the removed lines . Clearly, the coverage is lower, but not due to a developer fault.
This is not what I’m experiencing. The project status was set to fail. I got a red x in the github UI where according to the document you linked a green checkmark should be.
@JasonZhongZexin, we recently released a flag in the codecov.yml that should help fix this issue. It’s turned on by default, so no action is required on your part.
If there are no unexpected changes and the patch check is 100% (all “new” code is covered), the project status check will also pass. So if you have a PR that removes a bunch of unused code, it should no longer fail the status check.