OPS-157454: Upload test coverage to Codacy from CI - #63
Conversation
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>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | Report missing for d7a783f1 |
| Diff coverage | ✅ ∅ diff coverage |
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.
TIP This summary will be updated as you push new changes.
Summary
Adds a
coveragejob to CI that runs the test suite with Microsoft.Testing.Extensions.CodeCoverage and uploads the Cobertura report to Codacy withcodacy/codacy-coverage-reporter-action, modelled on PanoramicData.NugetManagement.pdl-publicself-hosted runner, never a GitHub-hosted one.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.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 teststep 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