Skip to content

OPS-157454: Upload test coverage to Codacy from CI - #71

Merged
davidnmbond merged 1 commit into
mainfrom
ci/codacy-coverage
Sep 27, 2026
Merged

davidnmbond merged 1 commit into
mainfrom
ci/codacy-coverage

Conversation

@davidnmbond

Copy link
Copy Markdown
Contributor

What

Adds a coverage job to the CI workflow. It builds the test project, runs the Microsoft.Testing.Platform test executable with Microsoft.Testing.Extensions.CodeCoverage (--coverage --coverage-output-format cobertura), uploads the Cobertura report to Codacy with codacy/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 on pdl-public, never a GitHub-hosted runner. A coverage.config matching 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.json sets failSkips: 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 with Category!=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

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>
@codacy-production

codacy-production Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage

Metric Results
Coverage variation Report missing for 4b496b51
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

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.

Run reviewer

TIP This summary will be updated as you push new changes.

@davidnmbond
davidnmbond merged commit 44ad0cc into main Sep 27, 2026
7 checks passed
@davidnmbond
davidnmbond deleted the ci/codacy-coverage branch September 27, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant