-
Notifications
You must be signed in to change notification settings - Fork 317
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
Add codecov and coverage threshold, hoist test requirements to setup.py #348
Conversation
Here's a build that shows the coverage threshold having teeth: |
No further changes planned, can happily be squashed. |
run: pytest --cov pydata_sphinx_theme --cov-report term-missing:skip-covered --cov-fail-under ${{ env.COVERAGE_THRESHOLD }} | ||
|
||
- name: Upload coverage | ||
if: ${{ always() }} |
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.
What is the purpose of this if statement, assuming that always
is always true?
This looks great! One quick question |
If the test job fails, it wouldn't normally run the coverage upload task,
the always makes sure it does. Having coverage from a fail isn't _too_
useful, in most cases, but since GitHub doesn't really have any test
aggregation capabilities (like azure pipes) this leaves at least _some_
record of the tests having been run.
|
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, looks good!
And we have a coverage overview now ;) https://codecov.io/gh/pydata/pydata-sphinx-theme/src/master/pydata_sphinx_theme/__init__.py |
docs/requirements.txt
toMANIFEST.in
[test]
[coverage]
withcodecov
andpytest-cov
fail-fast
(which is fine))