News for hackers. Stuff that matters.
Re:Modern Python CI with Coverage in 2025 by dnouri on Monday November 03, 2025 @01:46AM (#45796462)
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
Re:Modern Python CI with Coverage in 2025 by turtleyacht on Monday November 03, 2025 @02:05AM (#45796545)
Which packages or Actions would be used for mutation testing?
Re:Modern Python CI with Coverage in 2025 by dnouri on Monday November 03, 2025 @03:52AM (#45797111)
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:

- Mutatest: Python mutation testing: https://mutatest.readthedocs.io/

- Mutagen: https://github.com/timpaquatte/pytest-mutagen

Let me know how it goes.