CI: store merged coverage as an artifact
lmb opened this issue · comments
Running our test suite creates coverage information in coverage.out
:
$ ./run-tests.sh 6.1
Fetching linux-6.1-amd64.tgz
Fetching linux-6.1-amd64-selftests-bpf.tgz
...
$ ls -lh coverage.out
-rw-r--r--. 1 lorenz lorenz 521K Dec 6 14:12 coverage.out
That can be turned into a html report like so:
$ go tool cover -html=coverage.out -o coverage.html
$ ls -lh coverage.html
-rw-r--r--. 1 lorenz lorenz 899K Dec 6 14:56 coverage.html
We should integrate this into our CI:
- Upload each generated
coverage.out
as an artifact for that job - Collect all
coverage.out
from the various jobs and merge them usinggo tool covdata merge
- Generate a single .html which shows overall test coverage and upload attach that to the build somehow
- Brownie points if its possible to look at the coverage html by just clicking on a link instead of downloading + extracting
We might also have to investigate whether our merged test coverage in coverage.out
is accurate, it's suspiciously low in some files.
Happy to take it on
Hi @f1ko, still working on this?
Apologies, didn't get to it yet.
Feel free to work on it!
Hello @lmb, please review my PR and suggest improvements.
Thank you.