Skip to content

Add Codecov coverage reporting to CI#802

Merged
ptr727 merged 2 commits into
developfrom
add-codecov-coverage-reporting
Jul 4, 2026
Merged

Add Codecov coverage reporting to CI#802
ptr727 merged 2 commits into
developfrom
add-codecov-coverage-reporting

Conversation

@ptr727

@ptr727 ptr727 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Coverage reporting (report-only, never gated)

The unit-test job ran dotnet test with no coverage collection. This change:

  • Emits Cobertura from the existing test run: dotnet test --collect:"XPlat Code Coverage" --results-directory ./coverage (coverlet.collector was already referenced, just unused).
  • Uploads to Codecov via codecov/codecov-action (SHA-pinned to v7.0.0) with fail_ci_if_error: false.
  • Adds codecov.yml marking project/patch status informational, so a coverage change never blocks a merge. The only ruleset-required check remains "Check pull request workflow status job".
  • Threads CODECOV_TOKEN through the reusable validate-task.yml via secrets: inherit on both callers, and audits it in both the Actions and Dependabot secret stores in repo-config/configure.sh (a Dependabot-triggered push runs validate too). Docs updated: WORKFLOW.md §6 and repo-config/README.md.
  • AGENTS.md: note that CI CLI linters (actionlint, markdownlint, etc.) can be run via Docker.

Note: the Codecov upload authenticates only once CODECOV_TOKEN is set in both secret stores; until then configure.sh check FAILs those two assertions (expected).

Line-ending normalization (separate commit)

Repo-wide sweep bringing files to their .editorconfig ending (CRLF for .yml/.md/.json) and adding missing final newlines. Content-identity verified: only endings/final-newlines changed on those files. AGENTS.md line-ending guidance updated to "always honor .editorconfig" (fix on edit/create/discovery).

Verification

  • dotnet test: 162/162 pass; the --collect run produces ./coverage/<guid>/coverage.cobertura.xml.
  • actionlint (Docker) on all workflows: clean. markdownlint-cli2 (Docker) on all markdown: 0 errors.

🤖 Generated with Claude Code

ptr727 and others added 2 commits July 4, 2026 06:35
These files drifted from the .editorconfig line-ending rules (LF where
CRLF is mandated for .yml/.md/.json) or were missing the mandated final
newline. Bring them to spec; no content changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The unit-test job collected no coverage. Emit Cobertura from the existing
dotnet test run (coverlet.collector was already referenced) and upload it
to Codecov for trending only - never gated: the upload sets
fail_ci_if_error false and codecov.yml marks status informational, so a
coverage change or Codecov outage cannot block a merge.

CODECOV_TOKEN is threaded via secrets: inherit and audited in both the
Actions and Dependabot secret stores by configure.sh, since a
Dependabot-triggered push runs the validate job too. Docs (WORKFLOW.md,
repo-config/README.md) list the new secret; AGENTS.md notes CI CLI linters
can run via Docker.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 4, 2026 13:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds non-gating Codecov coverage reporting to the existing CI validation flow, so test coverage is collected and uploaded for visibility without affecting merge eligibility.

Changes:

  • Collect Cobertura coverage during dotnet test in the reusable validate-task workflow and upload it to Codecov with fail_ci_if_error: false.
  • Add codecov.yml to mark Codecov project/patch statuses as informational (report-only), and document/audit the required CODECOV_TOKEN secret.
  • Normalize line endings / add final newlines across various docs/config/sample JSON files per updated repo guidance.

Reviewed changes

Copilot reviewed 8 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
WORKFLOW.md Documents CODECOV_TOKEN usage and the report-only/non-gating intent.
codecov.yml Configures Codecov statuses as informational and disables PR comments.
.github/workflows/validate-task.yml Adds coverage collection to unit tests and uploads coverage to Codecov (non-gating).
.github/workflows/test-pull-request.yml Passes secrets through to the reusable validate workflow so coverage upload can authenticate.
.github/workflows/build-release-task.yml Passes secrets through to the reusable validate workflow in release orchestration.
repo-config/configure.sh Audits CODECOV_TOKEN presence in both Actions and Dependabot secret stores.
repo-config/README.md Documents the additional required secret name (CODECOV_TOKEN) and dual-store requirement.
.gitignore Ignores the generated coverage/ directory from local runs/CI artifacts.
AGENTS.md Updates line-ending guidance to always honor .editorconfig; adds note about running CI CLI tooling via Docker.
.vscode/tasks.json Line-ending/final-newline normalization only (no behavioral task changes).
Docs/LanguageMatching.md Line-ending/final-newline normalization only.
Docs/CustomOptions.md Line-ending/final-newline normalization only.
Docs/ClosedCaptions.md Line-ending/final-newline normalization only.
PlexCleaner.schema.json Final newline / formatting normalization only.
PlexCleaner/Properties/launchSettings.json Final newline / formatting normalization only.
Samples/PlexCleaner/PlexCleaner.v1.json Final newline / formatting normalization only.
Samples/PlexCleaner/PlexCleaner.v2.json Final newline / formatting normalization only.
Samples/PlexCleaner/PlexCleaner.v3.json Final newline / formatting normalization only.
Samples/PlexCleaner/PlexCleaner.v4.json Final newline / formatting normalization only.
.config/dotnet-tools.json Final newline / formatting normalization only.
.github/workflows/get-version-task.yml Line-ending/final-newline normalization only.
.github/workflows/build-executable-task.yml Line-ending/final-newline normalization only.
.github/workflows/build-docker-task.yml Line-ending/final-newline normalization only.

@ptr727 ptr727 merged commit a8ac2dc into develop Jul 4, 2026
15 checks passed
@ptr727 ptr727 deleted the add-codecov-coverage-reporting branch July 4, 2026 18:18
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.

2 participants