Skip to content

feat: add reusable go-coverage workflow for standardization#3006

Open
vdemeester wants to merge 1 commit intotektoncd:mainfrom
vdemeester:issue-3003-go-coverage
Open

feat: add reusable go-coverage workflow for standardization#3006
vdemeester wants to merge 1 commit intotektoncd:mainfrom
vdemeester:issue-3003-go-coverage

Conversation

@vdemeester
Copy link
Member

Changes

This PR creates a reusable _go-coverage.yml workflow in plumbing to standardize Go coverage reporting across all tektoncd repositories (addresses #3003).

What's included:

  • New reusable workflow .github/workflows/_go-coverage.yml that generates Go test coverage reports and posts them as PR comments
  • Uses standard Go modules checkout (no GOPATH structure required)
  • Configurable go-test-flags input for custom test flags
  • Requires CHATOPS_TOKEN secret for posting PR comments
  • Includes security hardening, concurrency control, and comprehensive usage documentation
  • Fix: Corrected typo in _slash.yml documentation (.github/actions/_slash.yml.github/workflows/_slash.yml)

Benefits:

  • Single source of truth for go-coverage implementation across all tektoncd repos
  • Easier to maintain and update (change once in plumbing, propagates everywhere)
  • Consistent coverage reporting across all tektoncd repositories
  • Reduces code duplication

Next steps after merge:

  • Migrate 7 existing repos to use this reusable workflow (operator, pruner, pipeline, results, chains, triggers, catlin)
  • Add workflow to 4 repos that don't have coverage yet (cli, plumbing, hub, mcp-server)

/kind feature

Submitter Checklist

  • Includes docs (comprehensive inline documentation in workflow file)
  • Commit messages follow commit message best practices

Closes #3003

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 10, 2025
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from vdemeester after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 10, 2025
@vdemeester
Copy link
Member Author

/hold

Making sure it can work (on tektoncd/pipeline first)

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 10, 2025
@vdemeester
Copy link
Member Author

Still doesn't work.. might take the issue differently

- Enable centralized coverage reporting across all tektoncd repos
- Simplify adoption with standard checkout, no GOPATH required
- Fix _slash.yml documentation path typo

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
@vdemeester vdemeester force-pushed the issue-3003-go-coverage branch from 2f37fed to bab47d5 Compare March 11, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create reusable go-coverage workflow in plumbing and standardize across all repositories

2 participants