Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Running Pluto with Malt.jl inside CI tests does not update code coverage

Open disberd opened this issue 4 months ago • 2 comments

This is not a direct issue to Pluto itself, but I thought it would be good to mention it in case someone else experience this.

I am running non-interactive Pluto sessions as part of CI tests in https://github.com/disberd/PlutoDevMacros.jl

After a while not submitting a PR anymore, I noticed a couple days ago that for my new PR, all of the parts of code only tested via the Pluto session did not appear as covered anymore despite being so in the previous CI run (a few months back).

Today as part of another PR I did think it could be related to recent versions of Pluto defaulting to Malt.jl rather than Distributed to run notebook code.

This commit simply set the flag to use distributed instead of Malt and indeed my code coverage went back up to around 95% correctly considering all of the code being only tested as part of a non-interactive Pluto session.

Just leaving this here in case someone else does run Pluto sessions as part of testing and saw the CI coverage drop.

disberd avatar Feb 19 '24 13:02 disberd

Thanks! This is an intentional difference between Malt and Distributed: Malt does not inherit the command line flags of the parent process, including --code-coverage. Feel free to make a PR like #2774 to allow setting the code coverage flag of worker processes. I think it would be nice if PlutoDevMacros could use Malt

fonsp avatar Feb 21 '24 08:02 fonsp

I didn't realize this was a julia flag :D. Thanks I'll make a PR

disberd avatar Feb 21 '24 08:02 disberd