Repository navigation
CI: report Python coverage and upload it to Codecov - #164
Merged
Merged
Conversation
Every test job ran the tests under coverage, but nothing read the result. Cython's plugin didn't help either. utils.pyx is compiled before the step that asked for line tracing, and on Python 3.14+ coverage's default core can't run the plugin. Measure the Python code only, without the plugin, with paths relative to the checkout. Print the report, with missing lines, in a "Coverage report" step, and upload coverage.xml to Codecov from every job. PRs from forks upload without a token. Pushes to main need the repository secret CODECOV_TOKEN, and an upload that fails doesn't fail the job. Codecov's statuses are informational (.github/codecov.yml).
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Each upload tried the uploader's gcov, Xcode, Swift and coverage.py plugins and logged a warning for each one that found nothing, in all 21 jobs. The "Coverage report" step already writes coverage.xml.
Member
Author
|
Alright, let's see if codecov works |
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.
Summary
Every test job ran the tests under coverage, but nothing read the result. This PR makes coverage of the Python code visible: in each job's log, and on Codecov across all 21 jobs.
utils.pyxstays untraced. Cython's plugin was compiled out anyway, since line tracing was requested only after the Build step, and on Python 3.14+ coverage's default core can't run the plugin (a CoverageWarning in 9 jobs).Upload auth:
mainuse the repository secretCODECOV_TOKEN.Evidence
CoverageWarning: Plugin file tracers (Cython.Coverage.Plugin) aren't supported with SysMonitor.coverage reportgives 71.4% (branches included).coverage.xmllists files asapi/binaryop.pyand so on, under the sourcesuitesparse_graphblas.COVERAGE_CORE=pytrace, which stands in for conda-forge's pure-Python coverage on 3.15t.codecov.yml.Merge Danger
Door: two-way. Revert the commit to undo it.
Blast Radius: CI only.
The package is unaffected. Codecov will post a comment and two informational statuses on PRs.