Skip to content

Add Go unit test coverage reporting to CI - #55105

Closed
pelikhan with code-coverage-agent[bot] wants to merge 2 commits into
mainfrom
code-coverage-agent/setup-code-coverage-reporting
Closed

pelikhan with code-coverage-agent[bot] wants to merge 2 commits into
mainfrom
code-coverage-agent/setup-code-coverage-reporting

Conversation

@code-coverage-agent

@code-coverage-agent code-coverage-agent AI commented Aug 23, 2026 •

Copy link
Copy Markdown

Unit tests had no coverage instrumentation; only integration tests in ci.yml produced coverage reports. This adds unit test coverage collection and upload to the PR-gating workflow.

Changes

  • .github/workflows/CWI.yml — two new jobs:

    • unit-tests: runs go test ./... -coverprofile=coverage-unit.out, converts to Cobertura XML via gocover-cobertura (same tool already used for integration tests), uploads artifact; fork PRs skipped
    • upload-coverage-go: downloads artifact, uploads to GitHub code coverage API with actions/upload-code-coverage@v1; requires code-quality: write + pull-requests: read (latter needed to resolve open PR number on push-triggered runs)
  • .gitignore — adds coverage*.xml (.out files were already excluded)

Uses the same gocover-cobertura pipeline already established in ci.yml — no new tooling introduced. Permissions are scoped per-job: test job holds only contents: read; upload job holds only what's needed for the API write.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@code-coverage-agent code-coverage-agent AI changed the title [WIP] Set up code coverage reporting for CI workflows Add Go unit test coverage reporting to CI Aug 23, 2026
Code Coverage Agent finished work on behalf of pelikhan August 23, 2026 15:21
@code-coverage-agent
code-coverage-agent AI marked this pull request as ready for review August 23, 2026 15:21
@pelikhan pelikhan closed this Aug 23, 2026
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