Join GitHub today
[MRG] Add codecov support #328
Some maintenance tasks while I was at it:
@@ Coverage Diff @@ ## master #328 +/- ## ========================================= Coverage ? 91.17% ========================================= Files ? 26 Lines ? 1723 Branches ? 0 ========================================= Hits ? 1571 Misses ? 152 Partials ? 0
@@> I don't get the codecov report. Pytest-cov also gives a report on coverage, that one is easy to understand.
The codecov comment is not always useful I agree. It is more useful once this is merged into master because it then does some kind of diff between master and the PR.
I generally look at things like per-file report https://codecov.io/gh/sphinx-gallery/sphinx-gallery/pull/328/tree?path=sphinx_gallery which is similar to the pytest-cov one.
There is also a very useful codecov browser extension that show you the line in the PR diff that are not covered by any tests. See https://github.com/codecov/browser-extension. Note: I don't think the codecov extension has been extended for Firefox 57 yet. I am watching codecov/browser-extension#44 and hoping this happens not too far in the future.
One last thing is that there is a codecov status that is red if your absolute coverage or the coverage of your diff is no high enough. The latter is quite useful because it tends to catch our laziness when we forget to add test for some edge cases.