Publish Pester test and coverage results in GitHub UI#118
Conversation
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR enhances the CI workflow to publish Pester test results and code coverage reports directly in GitHub's UI, eliminating the need for reviewers to download and manually inspect XML artifacts. The implementation adds GitHub Actions integrations for test and coverage reporting with appropriate fork-safety guards.
Changes:
- Integrated
dorny/test-reporter@v1to render NUnit test results as GitHub Checks (per OS matrix) - Integrated
madrapps/jacoco-report@v1.7.1to render JaCoCo coverage as GitHub Checks with PR comments - Added PowerShell step to generate human-readable coverage summary in workflow run summary
- Updated documentation to reflect the new UI reporting capabilities
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Added checks: write permission, integrated test reporter and coverage reporter actions, added PowerShell script to generate coverage summary with fork-safety conditionals |
docs/advanced/testing.md |
Documented that CI now publishes test results and coverage in GitHub UI |
CONTRIBUTING.md |
Added note about automatic UI publishing of test artifacts in CI |
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
….5 XML Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
…er compatibility Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Fixed! The issue was that Pester was outputting NUnit 2.5 XML format ( |
Summary
CI now publishes test results and coverage directly in GitHub's UI rather than requiring artifact downloads to inspect failures.
Motivation
Reviewers currently download ZIPs and manually parse XML to see test failures and coverage. This slows PR reviews and reduces visibility.
Type of Change
Changes
CI Workflow
checks: writepermission to test jobdorny/test-reporter@v1withjava-junitreporter for JUnit XML → GitHub Check (per OS)madrapps/jacoco-report@v1.7.1for JaCoCo XML → GitHub Check + PR comments$GITHUB_STEP_SUMMARYif: always()to surface failuresgithub.event.pull_request.head.repo.full_name != github.repositoryTest Output Format Change
NUnitXmltoJUnitXmlintools/Invoke-IdlePesterTests.ps1java-junitreporter requires proper JUnit XML format (<testsuites>root element)Coverage Parsing Script
Script Robustness
Set-StrictMode -Version Latestand$ErrorActionPreference = 'Stop'for consistency with other inline PowerShell scriptsLocalNameconsistently for XML property access to handle namespaces correctlyDocumentation
docs/advanced/testing.mdandCONTRIBUTING.mdto reflect JUnitXml format and UI reportingTesting
How to test & review
coverage.xml(70.05% coverage)<testsuites>root elementPR checks will demonstrate:
Checklist
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.