Repository navigation
OPS-157454: Upload test coverage to Codacy from CI - #12
Conversation
Adds a coverage job that runs the offline tests with Microsoft.Testing.Extensions.CodeCoverage and uploads the Cobertura report to Codacy. Excluded: None: all 5 tests (ConfigurationValidatorTests) are pure unit tests that need no credentials, so no filter is applied. Local line coverage (offline tests only, clean Linux container): 64.5% Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage ∅ diff coverage
Metric Results Coverage variation Report missing for 2c3b5c61 Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (2c3b5c6) Report Missing Report Missing Report Missing Head commit (721a5bf) 31 20 64.52% 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 (#12) 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.
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. None: all 5 tests (ConfigurationValidatorTests) are pure unit tests that need no credentials, so no filter is applied.
Adds Microsoft.Testing.Extensions.CodeCoverage 18.11.2 (the estate's version) through central package management, and opts LogicMonitor.Cli.Tests into the Microsoft.Testing.Platform runner so the executable accepts --coverage.
Coverage
Local line coverage from the offline tests, measured in a clean Linux container with no user secrets: 64.5%.
Tracked on OPS-157454.
🤖 Generated with Claude Code