Skip to content

Conversation

@otternq
Copy link
Contributor

@otternq otternq commented Jan 15, 2026

Summary

  • Add discover-modules job to dynamically find Go modules in repositories
  • Update test jobs to use module-based matrix for parallel test execution
  • Simplify go vet and go test steps using working-directory
  • Update test report and coverage paths for per-module artifacts

Benefits

  • Parallel execution - Each Go module tests in its own job simultaneously
  • Simplified steps - No more find | xargs loops, just working-directory
  • Portable - Works automatically for any repo with one or more Go modules

Files Changed

  • .github/workflows/go_lib_pull_requests.yml
  • .github/workflows/go_app_pull_requests.yml
  • .github/workflows/go_lib_push_main.yml
  • .github/workflows/go_app_push_main.yml

Additional Changes

  • Updated go_app_push_main.yml action versions: checkout@v3v4, setup-go@v3v5

Test plan

  • Test on a repo with a single Go module (e.g., root go.mod only)
  • Test on a repo with multiple Go modules (subdirectories with separate go.mod files)
  • Verify matrix jobs run in parallel in GitHub Actions UI
  • Verify Codecov receives coverage from all modules

🤖 Generated with Claude Code

otternq and others added 2 commits January 15, 2026 16:03
Add discover-modules job to all Go workflows that dynamically finds
go.mod files and outputs module paths as JSON for matrix consumption.

Changes:
- Add discover-modules job using find + jq to discover Go modules
- Update test jobs to use module matrix for parallel execution
- Simplify go vet and go test steps using working-directory
- Update test report and coverage paths for per-module artifacts
- Update go_app_push_main.yml actions to v4/v5

Benefits:
- Parallel test execution across modules
- Reduced complexity in vet/test steps
- Works automatically for any repo with multiple Go modules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use jq -sc (slurp + compact) to output single-line JSON for
$GITHUB_OUTPUT compatibility. Multiline JSON was causing
"Invalid format" errors in GitHub Actions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

4 participants