Fix coverage workflow install and expand Ubuntu CI test matrix#43
Conversation
maturin develop
|
@copilot the uploaded coverage report is really minimal and unhelpful (see below)- I would like html and markdown reports as well with line coverage so I can see which lines hit and which miss. |
Done in the latest commit. The coverage job now generates three report formats:
All three are bundled in the |
|
@copilot update the coverage step first add a pytest matrix of all currently supported python versions - 3.10 to 3.14 on ubunto only, update the coverage step to use py 3.12, update the github actions to the latest versions |
Addressed in 6601028. The workflow now adds an Ubuntu-only |
maturin developThere was a problem hiding this comment.
Pull request overview
This PR updates the project’s CI to fix the failing coverage job (previously using maturin develop without an active venv), adds a dedicated Ubuntu-only pytest matrix across supported Python versions, and modernizes several GitHub Actions used in the workflow while keeping the existing wheel build/test jobs.
Changes:
- Add
pytest-covto thetestoptional dependency group. - Introduce a new Ubuntu-only
pytestjob matrix for Python 3.10–3.14 and a dedicated Ubuntucoveragejob (Python 3.12) that installs viapip install -e .[test]and uploads coverage artifacts. - Update multiple GitHub Actions to newer major versions across existing jobs (checkout/setup-python/artifact actions/attestation, etc.).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pyproject.toml |
Adds coverage tooling to test extras (but needs a version constraint adjustment for pytest 9 compatibility). |
.github/workflows/CI.yml |
Fixes coverage job install path, adds Ubuntu pytest matrix, and updates Actions versions while preserving wheel-matrix jobs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| test = [ | ||
| 'pytest>=9,<10', | ||
| 'pytest-cov>=5,<7', | ||
| ] |
The
coverageActions job was failing before tests started because it invokedmaturin developwithout an active virtualenv. This change makes the job follow a packaging path that works in CI, adds an Ubuntu-only pytest matrix across all currently supported Python versions, and updates the workflow actions to current major versions while preserving the existing wheel-matrix jobs.Root cause
maturin develop --release --extras testrequires a virtualenv or conda environment.coveragejob ran it directly in the runner environment, so the job exited during setup.Workflow changes
pytestjob matrix for Python 3.10, 3.11, 3.12, 3.13, and 3.14.coveragejob on Linux/Python 3.12.maturin developstep with an editable install:python -m pip install -e .[test]coverage-reportsartifact.GitHub Actions updates
actions/checkouttov6.actions/setup-pythontov6.actions/upload-artifacttov7.actions/download-artifacttov8.actions/attest-build-provenancetov4.uraimo/run-on-arch-actiontov3.Dependency updates
pytest-covto thetestoptional dependency group inpyproject.toml.Resulting CI path