-
Notifications
You must be signed in to change notification settings - Fork 39
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
ci: Update tests workflow #199
Conversation
@clelange this is ready for review, but it covers quite a bit in its updates. If you'd prefer to just have the GHA updates and few other things I can do |
Thank you very much! CI really needs a revamp... I think is looks all good, I'm just wondering why test coverage doesn't work anymore. Any idea? |
Hm. I had assumed at first because this was coming from a fork that the coverage reporting wasn't working, but that's not the case given that the logs show
https://coveralls.io/builds/52666161 I'll put this PR into draft mode for the time being and look into it later. |
19b3885
to
34e751f
Compare
@clelange I had forgotten what a pain coveralls is if you want to use pytest. c.f. coverallsapp/github-action#30. Any chance I could convince you to switch to using Codecov (https://about.codecov.io/)? We use that for basically all of the Scikit-HEP projects and it works super well with pytest. |
Sure, whatever is easier! |
67176ab
to
9a53375
Compare
.github/workflows/tests.yml
Outdated
- name: Report contrib coverage with Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./coverage.xml | ||
flags: unittests-${{ matrix.python-version }} |
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.
To get coverage report comments on the PR you'll need to enable Codecov for the repo in the GitHub settings (similarly to how you did for Coveralls).
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.
OK, should be done. Thanks again!
Even though it's probably not needed, I've added a variable CODECOV_TOKEN
containing the token.
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.
Okay let me do a force push to try to trigger.
657998b
to
dbec7c1
Compare
Codecov Report
@@ Coverage Diff @@
## master #199 +/- ##
=========================================
Coverage ? 87.75%
=========================================
Files ? 4
Lines ? 964
Branches ? 195
=========================================
Hits ? 846
Misses ? 86
Partials ? 32
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Hm. That's certainly not right. I'll have to figure out why a bit later. |
9419467
to
d98dfd2
Compare
Codecov seems slow in updating its comment, but the coverage is now being reported at 87%: https://app.codecov.io/github/HEPData/hepdata_lib/pull/199 That might be laggy though as the CI logs are reporting 90%:
edit: Bumping again with a force push to see if that helps. |
* Add workflow dispatch option to run on demand. * Test against Python 3.8 which is the version of Python the ROOT binary was compiled against given the output of `root-config --python-version`. * Update all GitHub Actions. * Avoid deprecated direct calls to `python setup.py` and use local pip installs. * Use 'python -m pytest' to add current working directory to sys.path as src/ dir layout not used. - c.f. https://docs.pytest.org/en/7.1.x/explanation/pythonpath.html * Run on push events only if to master to let coverage from PRs report properly. * Use Codecov for reporting coverage. - Update badge in README to use Codecov - Add Codecov config file
d98dfd2
to
4542683
Compare
03833ee
to
04faf9d
Compare
@clelange okay after some bumping to get https://app.codecov.io/github/HEPData/hepdata_lib/commits?branch=ci%2Fupdate-ci to recognize that there was a diff from the last commit that it should inspect, the Codecov comment #199 (comment) has been updated by the GHA to show the new coverage it is reporting:
It is a bit lower than what coveralls was reporting because I added the |
@clelange this is ready for review again (but no rush). |
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 again, this all looks good to me!
root-config --python-version
.python setup.py
and use local pip installs.python -m pytest
to add current working directory tosys.path
assrc/
dir layout not used.