Closed ark0015 closed 3 years ago
So codecov is only reporting coverage, which is gathered by pytest. But where are we actually setting coverage requirements?
Also look at the "out-of-date" branch warning...
So codecov is only reporting coverage, which is gathered by pytest. But where are we actually setting coverage requirements?
I think that you can set the coverage to fail if it falls below some minimum (https://pytest-cov.readthedocs.io/en/latest/config.html with --cov-fail-under=MIN
). Do we want a minimum amount of coverage? Was this what you were thinking?
There also might be another option with a codecov-yaml indicating coverage ranges, this seems like what we would want, correct? https://docs.codecov.io/docs/codecov-yaml
Also look at the "out-of-date" branch warning
I'm not sure where you are seeing this?
Merging #247 (381d938) into master (3ece21b) will decrease coverage by
5.65%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #247 +/- ##
==========================================
- Coverage 91.21% 85.56% -5.66%
==========================================
Files 27 12 -15
Lines 4726 2723 -2003
==========================================
- Hits 4311 2330 -1981
+ Misses 415 393 -22
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3ece21b...381d938. Read the comment docs.
Two things:
Actually it looks like you already set a requirement at 50%?
Actually it looks like you already set a requirement at 50%?
Yeah, I really thought I had it with that one... I'm not sure why. It might have to do with the default threshold? The target I think is the overall coverage and the threshold is the difference between the last one. I will try again with a larger threshold.
Seems to be working now. Interesting that the codecov status was updated as soon the 3.7 CI-Test finished... since all three Pythons are running coverage, I suspect that the first one to finish is the one to report. Not a big problem.
This should output the coverage report in the correct format in addition to using the .coveragerc to exclude testing scripts, etc. from the coverage report.