I have a repo which contains a main package and a sub package located in /lib, for which I run CI in parallel using multiple GH-actions jobs (groups). This generally works well, except that it’s tricky to get coverage reports including coverage from all jobs.
to ensure that both src and the subpackage located in lib/ControlSystemsBase/src are included in the coverage, but this does not quite do what I want. Each job reports code coverage to codecov independently, and thus only includes the coverage for the code that was run for this particular job. This has the effect that the last job to finish and report the coverage “wins” by somehow overwriting the report of the earlier job, and codecov will thus only consider the lines covered by the last finishing job.
What I think I need to do is to let each job somehow save the .lcov files or the processed result, and then wait with processing coverage until the coverage info from all jobs is available. Does anyone know how to make something like this (or any other approach to the problem) happen using Github actions?
Are you sure about that? I was under the impression that Codecov somohow merged all code coverage results…
However, even if this is the case, it’s not ideal because you then receive alerts from codecov after each submission, until the last job finishes and the coverage statistics (as seen by codecov) are complete. So in any case I’d be interested to know if there is a good way to handle such cases.
Thanks, that appears to have solved half of my problems! The other half was solved by adding a forgotten Pkg.test(..., coverage=true). The full set of changes I had to do in my case, for anyone finding this thread in the future, can be found here