feat: go-test workflow for mono-repos#55
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for testing Go mono-repositories by introducing a new reusable workflow (go-test-monorepo.yml) that can handle multiple Go modules within a single repository. The workflow includes automatic mono-repo detection, module-aware linting using golangci-lint's experimental feature, and version-specific test execution based on Go's native go test work support introduced in Go 1.25.
- Creates a sample mono-repo structure for testing CI workflows
- Adds reusable workflow for mono-repo testing with automatic module detection
- Enables go.work files by uncommenting them in .gitignore
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/go-test-monorepo.yml | Main reusable workflow implementing mono-repo test support with automatic detection, golangci-lint experimental features, and version-aware test execution |
| .github/workflows/local-go-test-monorepo.yml | Local workflow file that calls the reusable mono-repo workflow |
| sample-monorepo/pkg/pkg.go | Sample package implementation with a simple function and a fuzzable function for testing |
| sample-monorepo/pkg/pkg_test.go | Unit and fuzz tests for the sample package using testify/v2 assertions |
| sample-monorepo/go.mod | Go module definition for the sample mono-repo module |
| sample-monorepo/go.sum | Dependency checksums for the sample mono-repo |
| sample-monorepo/doc.go | Package documentation for the sample mono-repo |
| go.work | Go workspace file enabling multi-module support |
| .gitignore | Uncomments go.work and go.work.sum to allow workspace files in version control |
| .claude/CLAUDE.md | Adds reference to GitHub Actions skills documentation for Claude Code |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2b6b172 to
4898cef
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #55 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 3 +1
Lines 8 14 +6
=========================================
+ Hits 8 14 +6 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
5fcb98e to
993817d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Change type
Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update
Short description
Fixes
Full description
Checklist