Skip to content
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

Resurrect reporting to codecov #401

Closed
webknjaz opened this issue Apr 16, 2021 · 7 comments · Fixed by #402
Closed

Resurrect reporting to codecov #401

webknjaz opened this issue Apr 16, 2021 · 7 comments · Fixed by #402

Comments

@webknjaz
Copy link
Member

I noticed that during the GHA migration this integration has been lost (cde5f20#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485L74). It should probably be reintroduced.

@agronholm
Copy link
Contributor

Yeah, it didn't work properly with GHA but it has been resolved in coveralls since.

@webknjaz
Copy link
Member Author

Well, their official action supports tokenless runs for quite a while now. So it should be fine to use it. Or do you intend to migrate to coveralls?

@agronholm
Copy link
Contributor

Ah, sorry, I use coveralls in my own projects so I mixed them up. I'll try to restore this to the workflow and see what happens. The thing is, I'm not sure how to implement parallel coverage reporting with codecov, so if you have any pointers, those would be welcome.

@webknjaz
Copy link
Member Author

You don't need to do anything extra. Just add a reporter to your jobs. Something like https://github.com/ansible/pylibssh/blob/1af102d/.github/workflows/build-test-n-publish.yml#L787-L790 should be enough — codecov merges multiple reports on their side.

Oh, and you probably want to add something like --cov-report=xml:pytest-cov.xml at https://github.com/pypa/wheel/blob/41b375e/setup.cfg#L55 (example: https://github.com/ansible/pylibssh/blob/1af102d/pytest.ini#L26) — I don't see the XML report emitted anywhere.

agronholm added a commit that referenced this issue Apr 27, 2021
agronholm added a commit that referenced this issue Apr 27, 2021
@agronholm
Copy link
Contributor

I'm seeing codecov falsely reporting coverage readings before the test suite has even finished. How could it have worked without being told that more results are coming in after all?

@webknjaz
Copy link
Member Author

There's some timeout. I think it waits for the PR checks too. But if something takes too long and the jobs report later, codecov updates the coverage.

@agronholm
Copy link
Contributor

Seems like you're correct – it just confused me that codecov reported a lower coverage value before all the jobs had finished. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants