-
Notifications
You must be signed in to change notification settings - Fork 81
Move codecov push to its own job in Actions workflow #502
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
Conversation
Remove the push to codecov step from the `test` job into a new job that depends on the test job. Upload the coverage report as an artifact after testing, and reuse that artifact in the new job. Only the coverage from the ubuntu runner with the latest dependencies is uploaded to minimize hits to codecov.
Try to see if this downloads the artifact and decompress it in the root of the git repo.
Upload coverage report obtained by ubuntu with optional dependencies.
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.
Nice! For Harmonica this will work great but for other packages that have optional dependencies, the full coverage is only obtained when merging reports from multiple jobs. Then this won't work. Do you think it would be possible to upload artifacts for all of the jobs?
I think we can. We would just have to name each artifact differently and then download them all and pushed them all in a single job. Does it make sense? |
👍🏾 |
Simplify dir structure of downloaded artifacts. Improve comments.
Since we are uploading all files at once, we don't need to keep track from which runner each one of them was generated.
This way we avoid having artifacts names `coverage-ubuntu-latest-latest` that could be confusing. This artifact would be now `coverage_ubuntu-latest_latest`.
Done! Now all runners upload the Let me know if you like it. I'm looking forward to try this out on a PR opened from a fork. |
Remove the push to codecov step from the
test
job into a new job that depends on the test job. Upload the coverage reports as artifacts after testing, and reuse the artifacts in the new job. Upload all coverage reports in a single push to Codecov to minimize the number of hits.Relevant issues/PRs:
Related to fatiando/community#151