Skip to content

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

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

Summary

Adds a coverage job to CI that runs the test suite with Microsoft.Testing.Extensions.CodeCoverage and uploads the Cobertura report to Codacy with codacy/codacy-coverage-reporter-action, modelled on PanoramicData.NugetManagement.

  • Runs on the pdl-public self-hosted runner, never a GitHub-hosted one.
  • The upload step is continue-on-error: true, so a Codacy outage cannot turn a passing test run red. The report is also kept as a workflow artifact for 7 days.
  • Adds coverage.config (generated-code and test-assembly exclusions, matching the rest of the estate) where one was missing.

Excluded tests

CI runs only tests that need no credentials. The coverage job runs the Jira.Api.Test unit-test project only (162 tests, all mocked). Jira.Api.Test.Integration needs a live Jira server and is not run; no tests needed tagging.
Also opts Jira.Api.Test into the Microsoft.Testing.Platform runner (UseMicrosoftTestingPlatformRunner), without which the test executable rejects --coverage. The existing dotnet test step was re-run locally and still passes all 162 tests.

Coverage

Local line coverage from the offline tests, measured in a clean Linux container with no user secrets: 46.0%.

Tracked on OPS-157454.

🤖 Generated with Claude Code

Adds a coverage job that runs the offline tests with
Microsoft.Testing.Extensions.CodeCoverage and uploads the Cobertura report
to Codacy.

Excluded: The coverage job runs the Jira.Api.Test unit-test project only (162 tests, all mocked). Jira.Api.Test.Integration needs a live Jira server and is not run; no tests needed tagging.

Local line coverage (offline tests only, clean Linux container): 46.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 d7a783f1
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d7a783f) Report Missing Report Missing Report Missing
Head commit (d1205ca) 2887 1329 46.03%

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 (#63) 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: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

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

@davidnmbond
davidnmbond merged commit 6b09520 into main Sep 27, 2026
6 of 7 checks passed
@davidnmbond
davidnmbond deleted the ci/codacy-coverage branch September 27, 2026 21:11
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