codecov allows you to specify a total coverage target and it also allows codecov/patch. The patch check however attempts to enforce that the patch coverage is atleast at current master's coverage. i.e. if total coverage target is 80% and if current master coverage is 84%, the patch coverage needs to be atleast 84%. I understand the rationale behind this, that codecov is not allowing the total coverage to regress...
My question is this - Is there a way at all to specify a fixed target for the patch coverage ? For e.g., let's say I want to set my patch coverage target to a fixed 80% as well, is there any way at all to do that ? Thanks in advance.
Codecov is a code analysis tool with which users can group, merge, archive, and compare coverage reports. Code coverage describes which lines of code were executed by the test suite and which ones were not. However, this is not to be confused with a testing tool.
You can get a link to your badge by going to Settings in codecov.io, selecting Badge from the right-hand side, and copying the Markdown link.
Yes, the documentation is here: https://docs.codecov.io/docs/commit-status
You can create a .codecov.yml
file at the root of the project with the following:
coverage:
status:
patch:
default:
target: 80%
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With