Use Python version as flag for Codecov #464
Merged
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.
Fixes #462.
Re: #462 (comment)
Two things here.
First add
-cov-report=term
to pytest, so we get output like this for 3.11 and can see coverage is missing (and 100% with 3.8-3.10):https://github.com/hugovk/bedevere/runs/6665212616?check_suite_focus=true#step:6:27
Second, add a Python version as a flag to the Codecov upload in each matrix job.
This adds a dropdown to the file view:
And for example selecting Python_3.11 shows these uncovered lines:
https://app.codecov.io/gh/hugovk/bedevere/blob/300b7d0ed649e9535c59db9824e9d1b041080839/bedevere/stage.py
Note
The flag must have no spaces as it's used as a URL parameter during upload.
We could skip those
include
lines that definematrix.codecov_flag
and instead useflags: Python_${{ matrix.python_version }}
, except it wouldn't work for the"3.11.0-alpha - 3.11.0"
version.We could replace
""3.11.0-alpha - 3.11.0"
with3.11-dev
instead, as far as I know that does the same thing, and is better: it has no upper limit of the .0 final version. For example3.10-dev
is pointing to 3.10.4. And anyway, when 3.11.0 comes out, we're going to replace it with"3.11"
.