Skip to content

feat: add coverage delta reporting for PRs#16

Merged
dims merged 1 commit into
NVIDIA:mainfrom
dims:coverage-delta-reporting
Feb 2, 2026
Merged

feat: add coverage delta reporting for PRs#16
dims merged 1 commit into
NVIDIA:mainfrom
dims:coverage-delta-reporting

Conversation

@dims

@dims dims commented Feb 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add coverage delta reporting to PR comments, showing per-file coverage changes compared to the main branch baseline.

Motivation / Context

Adopted from nvsentinel's consolidated-coverage-report pattern. Makes it easier to see how a PR affects test coverage without manually comparing numbers.

Type of Change

  • New feature (non-breaking change that adds functionality)
  • Build/CI/tooling

Component(s) Affected

  • Other: .github/actions/go-coverage, .github/workflows/on-push-comment.yaml

Implementation Notes

  • Uploads coverage.out as artifact (90-day retention) for baseline comparison
  • Downloads baseline from last successful main branch run
  • Uses tj-actions/changed-files to detect changed Go files (same as nvsentinel)
  • Uses fgrosse/go-coverage-report to generate delta report (same as nvsentinel)
  • Gracefully handles missing baseline: shows informative message instead of noisy delta
  • Preserves existing coverage badge section

Risk Assessment

  • Low — CI-only change, no impact on application code

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 1, 2026 23:38
@dims dims force-pushed the coverage-delta-reporting branch from 9547723 to ed3fa16 Compare February 1, 2026 23:41

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 PR coverage “delta” reporting by persisting a baseline coverage profile from the last successful main run and generating per-file coverage change details in the PR coverage comment.

Changes:

  • Upload coverage.out as a long-lived artifact to use as the main baseline for later PR comparisons.
  • Enhance the workflow_run comment workflow to download PR + baseline coverage, detect changed Go files, and generate a delta report via fgrosse/go-coverage-report.
  • Extend the PR coverage comment body to include the delta report (or a fallback message when unavailable).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/on-push-comment.yaml Downloads PR + baseline coverage artifacts, computes changed-file list, optionally generates a delta report, and appends it to the PR comment.
.github/actions/go-coverage/action.yml Uploads the raw coverage.out profile as an artifact so a later workflow can compare PR coverage vs. baseline.

Comment thread .github/workflows/on-push-comment.yaml Outdated
Comment thread .github/workflows/on-push-comment.yaml
Comment thread .github/workflows/on-push-comment.yaml Outdated
Comment thread .github/actions/go-coverage/action.yml Outdated
Enhance PR coverage comments to show what changed:
- Upload coverage.out as artifact for baseline comparison
- Download baseline from last successful main run
- Use fgrosse/go-coverage-report to generate delta report
- Show per-file coverage changes in PR comments

Inspired by nvsentinel's consolidated-coverage-report pattern.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: Davanum Srinivas <[email protected]>
@dims dims force-pushed the coverage-delta-reporting branch from ed3fa16 to ad6b4a6 Compare February 1, 2026 23:46
@github-actions

github-actions Bot commented Feb 1, 2026

Copy link
Copy Markdown
Contributor

Coverage Report ✅

Metric Value
Coverage 73.7%
Threshold 70%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-73.7%25-green)

@dims dims merged commit 00299b2 into NVIDIA:main Feb 2, 2026
3 checks passed
@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked since it has been closed for 90 days with no further activity. Please open a new pull request for related changes.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants