-
Notifications
You must be signed in to change notification settings - Fork 9
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
Re-enable test coverage #104
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #104 +/- ##
==========================================
- Coverage 67.36% 57.73% -9.64%
==========================================
Files 79 48 -31
Lines 10789 7639 -3150
Branches 0 1594 +1594
==========================================
- Hits 7268 4410 -2858
+ Misses 3521 2848 -673
- Partials 0 381 +381
Continue to review full report at Codecov.
|
Oh, looks like it works! ☝️ Previously, the coverage included the test code. I've removed those files from the coverage report, and was expecting a drop in coverage. Also, there might be some new code and/or tests added since the last run, so a decrease is probably OK. |
@@ -1,6 +1,6 @@ | |||
name: Unit Tests | |||
|
|||
on: [push] | |||
on: [push, pull_request] |
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.
Should be OK to include pull_request
too?
@@ -0,0 +1,7 @@ | |||
[pytest] | |||
addopts = | |||
--cov |
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.
This line will be picked up by pytest
, so it will invoke the pytest-cov
plug-in (added to the requirements/tests.txt
file).
Hi,
I haven't looked at the git log to confirm, but looking at codecov it looks like even though we are running it in GH actions, the coverage command is not able to locate any coverage information.
The last reported coverage in Codecov for janis-core is from 3rd June 2021. This PR includes the configuration for pytest, pytest-cov, and coverage/codecov to produce the
.coverage
file locally. The build time might increase a little, since running the tests will include coverage by default. If that's a problem I can think of some ways to have it enabled only for GH Actions 👍Draft until CI runs and I can confirm it worked as expected on my branch and in codecov.
Bruno