I covered a gap by blogging about: Modern Python CI with Coverage in #2025
Let me know in the comments if you think it's useful.
From the table of contents:
Our toolchain
py-cov-action: GitHub-native coverage
The two-workflow pattern for fork PRs
pytest-xdist: Parallel testing by default
uv: Fast package management
Six critical gotchas
Gotcha #1: Using coverage run -m pytest with xdist
Gotcha #2: Missing relative_files = true
Gotcha #3: Hidden files excluded from artifacts
Gotcha #4: Fork PRs can't post comments
Gotcha #5: Missing pytest-cov plugin
Gotcha #6: E2E tests with subprocesses contribute 0% coverage
Complete working example
.github/workflows/ci.yml
.github/workflows/post-coverage-comment.yml
pyproject.toml configuration
Verifying your setup
Check relative paths
Verify artifact upload
Test fork PR comments
What success looks like
Migration notes
From Codecov/Coveralls
From pip to uv
Next steps
Resources
turtleyacht•6h ago
Which packages or Actions would be used for mutation testing?
dnouri•4h ago
Interesting question. However, I haven't worked with those kinds of tests before.
It looks like there's two pytest plugins at least to support you with that:
dnouri•6h ago
Let me know in the comments if you think it's useful.
From the table of contents:
turtleyacht•6h ago
dnouri•4h ago
It looks like there's two pytest plugins at least to support you with that:
- Mutatest: Python mutation testing: https://mutatest.readthedocs.io/
- Mutagen: https://github.com/timpaquatte/pytest-mutagen
Let me know how it goes.