Skip to content

Add Go code coverage reporting with Cobertura XML and GitHub upload - #340

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

remyleone 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 5, 2026

Copy link
Copy Markdown

Adds Go code coverage reporting integrated into the existing CI pipeline, producing Cobertura XML reports and uploading them to GitHub's code coverage API for PR annotations and baseline comparisons.

Changes

Makefile

  • Defines GOCOVER_COBERTURA pointing to $(TOOLS_HOST_DIR)/gocover-cobertura
  • Adds auto-install target for gocover-cobertura via go install
  • Wires the existing cobertura target to depend on the tool, so make cobertura is self-contained

.gitignore

  • Excludes _output/tests/ (coverage profiles, Cobertura XML, test logs)

.github/workflows/ci.yml

  • Adds make cobertura step in unit-tests job to convert coverage.txtcobertura-coverage.xml, filtering out generated (zz_*) files
  • Uploads the Cobertura XML as a workflow artifact (skipped on fork PRs)
  • Adds upload-coverage-go job with code-quality: write that downloads the artifact and calls actions/upload-code-coverage@v1; gated so it only runs when unit-tests succeeds and not on fork PRs

…load

Co-authored-by: remyleone <300834+remyleone@users.noreply.github.com>
@code-coverage-agent code-coverage-agent AI changed the title [WIP] Set up code coverage reporting in CI workflows Add Go code coverage reporting with Cobertura XML and GitHub upload Aug 5, 2026
@code-coverage-agent
code-coverage-agent AI marked this pull request as ready for review August 5, 2026 16:38
Code Coverage Agent finished work on behalf of remyleone August 5, 2026 16:38
@code-coverage-agent
code-coverage-agent AI requested a review from yfodil as a code owner August 5, 2026 16:38
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: Go

Go / code-coverage-agent

The overall coverage in commit 36a277c in the code-coverage-agent/... branch is 0%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main code-coverage-agent/... 36a277c +/-
apis/cluster/v1...ha1/register.go 0%
apis/cluster/v1...ta1/register.go 0%
apis/namespaced...ha1/register.go 0%
apis/namespaced...ta1/register.go 0%
cmd/generator/main.go 0%
cmd/provider/main.go 0%
internal/clients/scaleway.go 0%
internal/contro...onfig/config.go 0%
internal/contro...onfig/config.go 0%

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (e882094) to head (36a277c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #340   +/-   ##
=======================================
  Coverage    0.00%    0.00%           
=======================================
  Files        1233     1233           
  Lines      131470   131470           
=======================================
  Misses     131470   131470           
Flag Coverage Δ
unittests 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Code Coverage Agent finished work on behalf of remyleone September 8, 2026 10:01
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.

3 participants