ADR 0003: CI coverage policy¶
Status¶
Accepted
Context¶
The project targets 100% test coverage for production code. CI must collect coverage on every run, surface results on pull requests, and prevent regressions.
Decision¶
- Tooling: Use
pytest-cov(dev dependency) with[tool.coverage.*]configuration inpyproject.toml. - Local and CI entry point:
just test-covruns integration tests undertests/andpydocks/features/with coverage for thepydockspackage. - Threshold: CI enforces 100% line coverage via
COVERAGE_FAIL_UNDER(default). Tests run undercoverage runfor accurate measurement. - CI reporting:
- Markdown coverage summary in the GitHub Actions job summary (
irongut/CodeCoverageSummary) - Pull request comment via
py-cov-action/python-coverage-comment-action(Python 3.14 matrix job) coverage.xmlandhtmlcov/uploaded as workflow artifacts- Scope:
just testruns tests without the coverage gate for faster local iteration.
Consequences¶
- Coverage regressions fail CI on every matrix Python version.
- Pull requests show line-level coverage without external services.
- Developers use
just test-covbefore opening PRs that touch production code.