Once the repository's own Pester task measures code coverage (JaCoCo output under tests/out/), CI should surface it — today the shared workflow only uploads and publishes testResults.xml.
Why this is a separate issue
This repository's test.yml delegates to the psake org's shared workflow (psake/.github/.github/workflows/ModuleCI.yml@main), whose artifact/publish steps are fixed. Surfacing coverage therefore requires a change in the psake/.github repository, not here. Options, roughly in ascending ambition:
- Extend the shared workflow's artifact upload to include
tests/out/coverage.xml when present
- Add a coverage PR comment/check (for example
irongut/CodeCoverageSummary or the JaCoCo report action) gated on the file existing, so modules without coverage output are unaffected
- Wire up a coverage service (Codecov and similar) with badges
Interim state
The repository prints a coverage summary line in the Pester task output, so the number is visible in every CI log even before the shared workflow learns to publish the artifact.
Caveat worth documenting wherever this lands
Coverage instruments the current session only. Tests that exercise code in child processes (the build.tests.ps1 child builds and the Test-PSBuildPester subprocess matrix from #102) do not contribute to the measured number, so the metric understates true coverage — useful as a trend line, not as an absolute.
Once the repository's own Pester task measures code coverage (JaCoCo output under
tests/out/), CI should surface it — today the shared workflow only uploads and publishestestResults.xml.Why this is a separate issue
This repository's
test.ymldelegates to the psake org's shared workflow (psake/.github/.github/workflows/ModuleCI.yml@main), whose artifact/publish steps are fixed. Surfacing coverage therefore requires a change in the psake/.github repository, not here. Options, roughly in ascending ambition:tests/out/coverage.xmlwhen presentirongut/CodeCoverageSummaryor the JaCoCo report action) gated on the file existing, so modules without coverage output are unaffectedInterim state
The repository prints a coverage summary line in the Pester task output, so the number is visible in every CI log even before the shared workflow learns to publish the artifact.
Caveat worth documenting wherever this lands
Coverage instruments the current session only. Tests that exercise code in child processes (the
build.tests.ps1child builds and theTest-PSBuildPestersubprocess matrix from #102) do not contribute to the measured number, so the metric understates true coverage — useful as a trend line, not as an absolute.