OPS-157454: Upload test coverage to Codacy from CI - #71
Conversation
Adds a coverage job to CI that runs the offline tests with Microsoft.Testing.Extensions.CodeCoverage and uploads the Cobertura report to Codacy, on the pdl-public runner. Excluded from CI (need credentials or a live service): nothing; all 92 tests run offline, so no filter is applied. Local line coverage with the CI filter, in a clean Linux container: 60.4%. Also sets UseMicrosoftTestingPlatformRunner in the test project, without which the xunit v3 test executable rejects --coverage. The figure includes the Demo assembly (18.0%); the library itself is at 89.9%. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | Report missing for 4b496b51 |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (4b496b5) Report Missing Report Missing Report Missing Head commit (be5723e) 3327 2009 60.38% Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#71) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
What
Adds a
coveragejob to the CI workflow. It builds the test project, runs the Microsoft.Testing.Platform test executable withMicrosoft.Testing.Extensions.CodeCoverage(--coverage --coverage-output-format cobertura), uploads the Cobertura report to Codacy withcodacy/codacy-coverage-reporter-action(continue-on-error: true, so a Codacy outage cannot turn a green run red), and keeps the report as a 7-day artifact. It runs onpdl-public, never a GitHub-hosted runner. Acoverage.configmatching the estate's reference (PanoramicData.NugetManagement) excludes test assemblies and generated code.Which tests run in CI
Only tests that need no credentials. The estate's
xunit.runner.jsonsetsfailSkips: true, so an unconfigured test would fail rather than skip. Tests that need live credentials or a live service are tagged[Trait("Category", "Integration")]and CI filters withCategory!=Integration. No test was deleted and no assertion changed.Excluded: nothing; all 92 tests run offline, so no filter is applied.
Local line coverage (CI filter, clean Linux container with no user secrets): 60.4%
Other changes
Also sets UseMicrosoftTestingPlatformRunner in the test project, without which the xunit v3 test executable rejects --coverage. The figure includes the Demo assembly (18.0%); the library itself is at 89.9%.
Tracked on OPS-157454.
🤖 Generated with Claude Code