Skip to content

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

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 ci.yml that runs the tests with code coverage and uploads the Cobertura report to Codacy. It runs on pdl-public because the repository is public.

  • Runs the xunit v3 Microsoft.Testing.Platform test executable with --coverage (Microsoft.Testing.Extensions.CodeCoverage), using a coverage.config modelled on PanoramicData.NugetManagement.
  • Uploads with codacy/codacy-coverage-reporter-action@v1 using the CODACY_PROJECT_TOKEN secret. The upload has continue-on-error: true, and the report is also kept as a 7-day artifact.

The test project gains UseMicrosoftTestingPlatformRunner so the test executable accepts --coverage; it already referenced Microsoft.Testing.Extensions.CodeCoverage. The build job's dotnet test step was re-checked locally and still passes.

Excluded tests

Tests tagged [Trait("Category", "Integration")] (the ServiceNowTest base class), which call a real ServiceNow instance with credentials from user secrets. The filter Category!=Integration matches the one the build job already uses. 23 offline tests run.

Coverage

Local line coverage in a clean Linux container (mcr.microsoft.com/dotnet/sdk:10.0.401, no user secrets) is 40.0%.

Jira: https://jira.panoramicdata.com/browse/OPS-157454

🤖 Generated with Claude Code

Adds a coverage job on pdl-public that runs the test executable with
Microsoft.Testing.Extensions.CodeCoverage and uploads the Cobertura report
to Codacy.

The test project gains UseMicrosoftTestingPlatformRunner so the test
executable accepts --coverage; it already referenced
Microsoft.Testing.Extensions.CodeCoverage. The build job's dotnet test
step was re-checked locally and still passes.

Excluded: Tests tagged [Trait("Category", "Integration")] (the
ServiceNowTest base class), which call a real ServiceNow instance with
credentials from user secrets. The filter Category!=Integration matches
the one the build job already uses. 23 offline tests run.
Local line coverage (clean Linux container): 40.0%.

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 43389031
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4338903) Report Missing Report Missing Report Missing
Head commit (002c245) 169 68 40.24%

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 (#91) 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 b219397 into main Sep 27, 2026
7 of 9 checks passed
@davidnmbond
davidnmbond deleted the ci/codacy-coverage branch September 27, 2026 21:36
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