Skip to content

ci: add Codecov coverage upload and badge#307

Merged
maximn merged 1 commit into
masterfrom
chore/codecov-coverage
Jun 15, 2026
Merged

ci: add Codecov coverage upload and badge#307
maximn merged 1 commit into
masterfrom
chore/codecov-coverage

Conversation

@maximn

@maximn maximn commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Publish test coverage to Codecov so PR reviewers get an inline coverage heatmap, and add a coverage badge to the README. No new test packages were needed — coverlet.collector was already referenced in both test projects.

Related issue

n/a

Changes

  • Collect Cobertura coverage in both CI test steps (net8.0/net10.0) and upload it via codecov/codecov-action (pinned to a commit SHA), running with if: always() so the heatmap uploads even on test failure.
  • Add coverlet.runsettings scoping coverage to the shipped GoogleMapsApi and GoogleMapsApi.Extensions.DependencyInjection assemblies (excludes test/sample/benchmark code).
  • Add a Codecov badge to the README badge block.

Test plan

  • Ran dotnet test ... --collect:"XPlat Code Coverage" --settings coverlet.runsettings locally; a coverage.cobertura.xml is produced and contains only the two shipped assemblies.

Important

Requires a CODECOV_TOKEN repository secret before the upload step works in CI; the badge renders after the first upload to master.

Checklist

  • dotnet format has been run.
  • dotnet test passes locally (with a valid GOOGLE_API_KEY for integration tests).
  • Multi-framework build passes (netstandard2.0, net8.0, net10.0).
  • XML documentation updated if public API surface changed.

Collect Cobertura coverage in CI via the existing coverlet.collector and
upload it to Codecov. Add a coverlet.runsettings that scopes coverage to the
shipped GoogleMapsApi assemblies, and add a Codecov badge to the README.
@github-actions

Copy link
Copy Markdown

🔬 TestGlance

✅ 249 passed across 1 job — 95.8% · ⏱️ 9.7s

Job Result Pass rate Duration Health
build 249/260 · 95.8% 9.7s Report
🟡 build — details

✅ 249 passed · ⏭️ 11 skipped
███████████████░ 95.8%
⏱️ 9.7s

vs master

Metric master PR Delta
Pass rate 95.8% 95.8% -0.0%
Duration 10.4s 9.7s -6.6%

📄 HTML Report


Updated 2026-06-15T19:58:08.391Z

@maximn maximn merged commit bbb9190 into master Jun 15, 2026
6 checks passed
@maximn maximn deleted the chore/codecov-coverage branch June 15, 2026 20:05
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