-
Notifications
You must be signed in to change notification settings - Fork 17
add option to generate test coverage report without codecov #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add option to generate test coverage report without codecov #207
Conversation
8a31636 to
fba02a5
Compare
|
I tried this out on sunpy and it seems to explode. sunpy/sunpy#7668 |
|
It seems that it's not picking up the coverage.xml to upload here: https://github.com/sunpy/sunpy/actions/runs/9445798095/job/26014155532?pr=7668#step:14:16 🤔 |
Cadair
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for taking a swing at this!
.github/workflows/tox.yml
Outdated
| - run: python -Im pip install --upgrade coverage[toml] | ||
| - run: python -Im coverage combine | ||
| - run: python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to add the ability to fail this job based on either total coverage % or diff coverage %.
|
tl;dr -- this does not generate patch coverage, right? |
|
Not yet, but I found a way to make it. |
For patch coverage we'd need to store the coverage from |
325b539 to
156160e
Compare
|
I am trying this out too at spacetelescope/acstools#205 and it still crashes: https://github.com/spacetelescope/acstools/actions/runs/9463279566/job/26068438067?pr=205 |
oh whoops, I fixed the artifact issue: |
d8c63d1 to
c5b70cf
Compare
c5b70cf to
f891927
Compare
f891927 to
430ed7e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Even when CI passes, it failed with the same error.
|
it should be uploading / downloading the |
|
it looks like pytest --pyargs acstools --cov-report=xml --cov=acstools /home/runner/work/acstools/acstools/doc --cov --remote-data -v |
|
running |
|
What is the difference between |
I'm not intimately familiar with it, but as far as I know We could use |
|
Tried to debug at #209 but no luck. I see the coverage ran but the the upload failed: https://github.com/spacetelescope/acstools/actions/runs/9483014271/job/26134042811?pr=205 |
could you also add |
|
Ah, yes, added. New log: https://github.com/spacetelescope/acstools/actions/runs/9483014271/job/26138000458?pr=205 |
a93aa3f to
77d2c12
Compare
77d2c12 to
fb26195
Compare
|
@neutrinoceros try now, it should be rebased |
|
thank you ! now zacharyburnett#1 is much easier to read ! |
324ba68 to
ce2cffe
Compare
|
well of course it just had to fail, right ? |
|
ok it's coming from |
|
Can you fork on the value of the coverage option? |
|
This is already the case. However it looks to me that I can't drop the assumption that pytest-cov is used without a significant change, because then I cannot simply generate a command by appending arguments. I need to think this over for a bit. |
|
I'm going to lay out the design constraints I'm seeing:
This just seems impossible to do in the most general case. I can see why Anyway, this problem I'm reporting isn't specific to this PR, it's pre-existing. All things considered, it seems reasonable to preserve the assumption that pytest-cov is needed for the time being, and I can revisit this adjacent issue later. I'll open a new PR-to-PR to restore functionality. |
restore assumption that pytest-cov is ubuquitous
|
I don't understand why it's still failing now. I can spend some more time digging it tommorow. In the mean time, I would suggest adding a debug step to run |
|
(my rant about pytest-cov now has its own issue #330) |
|
Phew, took me a while to get there, but I finally have something that works again: zacharyburnett#3 important notes: I couldn't, for the life of me, figure out where Footnotes
|
|
Oh and I just realized another important limitation : combining coverage data from different platforms is really tricky (TBH, I could never quite figure it out, but I did fiddle with this a couple times and the author claims it's possible). To the extent I understand how it's supposed to work, it should be possible to configure it on the user side. If we're going to release this in its current state, it should be advertised very clearly. |
Fixup PR 207 (again)
|
Whoops. Guess why I didn't run pre-commit hooks locally ? (a clue: #328) |
|
Also, there's a job stuck because it's trying to use |


using the guide here: https://hynek.me/articles/ditch-codecov-python/
This does not create coverage diffs or report to PRs, just creates a markdown summary table
closes #189
EDIT: here's what the summary table looks like:
