Prepare a coverage report in the CI#2299
Conversation
f158d7f to
bcca428
Compare
52edf2a to
8a1fa1f
Compare
|
Can also be used to identify dead code? I.e. if a function is not being tested that could be a good indicator that it's not used anymore. Is it possible outputting a list of the functions that are not covered rather than just the percentage per file? |
|
Yes. Not sure if in terms of functions but you can also have a look at the report in terms of lines being skipped. For some files there are big chunks which are currently untested. |
That doesn't surprise me too much, but I'm curious to find out how much of the untested code hasn't been used in years anyway |
|
That's more difficult to know, for instance the closure tests have some files that are around 20% covered, but there's a lot of stuff going on in closure-test-land for which we have no tests. |
69ec934 to
41739b1
Compare
Perhaps it would be better to have a test badge that shows the coverage rather than having it only in the CI? |
|
I think it'd be nice, but when I was preparing the workflow the alternatives I could find were either autocommit at the end (big no!) or use codecov (which seems to be a security nightmare just for a badge). If you know of some alternative where one can just upload the report and get coverage without bells and whistles I'd be happy to add it. (there is a third option, use our own server for that, in another moment I would be happy to set up and maintain that but right now I'd rather not) |
|
I'd be very surprised of the people looking at our code at a surface level (i.e. not even opening a ci report) care about codecov |
41739b1 to
1c8b5bd
Compare
This closes #29 :)
At the moment the coverage report is not uploaded and not enforced just shown in the CI.
We have currently 69% coverage (nice! since it is "organic"!)
I'm not sure whether some tests started by subprocesses are counted correctly (apparently is is quite difficult to do so, but pytest-cov includes some tricks).