Closed
Upload pytest coverage to GitHub from the latest Python CI job#68
Conversation
Copilot
AI
changed the title
[WIP] Add code coverage to the workflow
Upload pytest coverage to GitHub from the latest Python CI job
Jul 25, 2026
hspaans
marked this pull request as ready for review
July 25, 2026 20:59
Contributor
There was a problem hiding this comment.
Pull request overview
Adds GitHub-native code coverage reporting to the CI workflow by generating a Cobertura (coverage.xml) report from the pytest run on the latest Python version in the matrix and uploading it to GitHub.
Changes:
- Grants the
toxjobcode-quality: writepermission to authorize coverage uploads. - Extends pytest options for the
3.14matrix run to emitcoverage.xml. - Uploads
coverage.xmlviaactions/upload-code-coverage@v1, gated to Python3.14.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+54
to
+60
| - name: Upload code coverage report | ||
| if: matrix.py == '3.14' | ||
| uses: actions/upload-code-coverage@v1 | ||
| with: | ||
| file: coverage.xml | ||
| language: Python | ||
| label: code-coverage/pytest |
Owner
|
Code Quality uploads aren't currently supported for personal repositories. Closing issue until support is available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds code coverage upload to the CI workflow by publishing the pytest-generated Cobertura report to GitHub, scoped to the latest Python version in the test matrix.
CI workflow updates
code-quality: writepermission to thetoxjob so coverage upload is authorized.3.14(latest configured version).Coverage artifact generation
3.14matrix run to emitcoverage.xml:--cov-report=xml:coverage.xmlCoverage upload step
actions/upload-code-coverage@v1gated byif: matrix.py == '3.14'.file: coverage.xmllanguage: Pythonlabel: code-coverage/pytest