pyrig-codecov Documentation
A pyrig plugin that integrates codecov.
What it does
Drop-in pyrig plugin that wires Codecov into your project:
- Enforces 100% coverage as the pass threshold.
- Generates
coverage.xmlalongside your normal test run. - Adds a Codecov upload step to the CI health-check workflow.
- Adds
coverage.xmlto your version control ignore list. - Adds a Codecov badge to your README.
No configuration required — installing the package as a development dependency is the whole setup. Then regenerate your pyrig configs as usual. The plugin's overrides are picked up automatically.
Installation
uv add --group dev pyrig-codecov
uv run pyrig mkroot
Setup
Two one-time steps on the repository side:
- Codecov Account - Get an account on codecov.io.
- Upload Token - Get an upload token from Codecov
- Add token to repository secrets - Add the token to your repository secrets
on GitHub as
CODECOV_TOKEN
After that, every CI health check run uploads its coverage report to Codecov.
How it works
The plugin subclasses two pyrig base classes:
CoverageTester— overrides the coverage threshold, report format, badge URLs, and the auth token key.HealthCheckWorkflowConfigFile— appends acodecov/codecov-action@mainstep to the matrix health-check job