Description
In one of our code changes, we received a failed status check. According to the coverage report, the test covers 100% of the changes, but the status check of Codecov/project is still set to fail on our GitHub page. Based on the manual investigation, this failure status check may have been caused by the project’s decrease in the coverage rate (-0.01%). However, this decrease is caused by the deletion of the unused code. According to one of the discussions in this chat, such deletion of code will be made up as “offset coverage”. However, based on our experience, the “offset coverage” is not working like expected. Are there any tips for this problem or how I could set the status check to success in such a situation?
Here is the link to the PR.
CI/CD URL
Codecov Output
Merging #799 (bf9fc00) into master (ceee78f) will decrease coverage by 0.00%
.
The diff coverage is 100.00%
.
@@ Coverage Diff @@
master #799 +/-
==========================================
- Coverage 59.14% 59.13% -0.01%
==========================================
Files 218 218
Lines 21902 21900 -2
========================================== - Hits 12953 12951 -2
Misses 8949 8949
Expected Results
In such cases, the result of the status is expected as successful since the test covers all changes, and the loss of the coverage rate is caused by the deletion of unused code.
Actual Results
The project status check was set to fail. I got a red x in the GitHub UI.