Codecov
Codecov is used to check the code coverage of unit tests.
It can also be used to block merging a pull request if there is insufficient code coverage.
Configuration¶
coverage > status¶
project / patch¶
Tests for project as a whole, or for specific patch
target¶
- Target coverage percentage
threshold¶
- Tolerance
base¶
- Relative to previous commit
Code¶
coverage:
status:
project:
default:
target: 30% # Project code should have 60% coverage
threshold: 10% # Tolerance for the overall project (existing code)
base: auto # Compare against the most recent relevant commit
patch:
default:
target: 100% # Newly added or modified code should have 100% coverage
threshold: 10% # Tolerance for the patch
comment: true # Enable comment