Conversation
Add GitHub Actions CI workflow for the Go SDK with lint (go vet + golangci-lint), tests across Go 1.21-1.23 with race detection, coverage reporting, and build verification. Also rename client_test_helpers.go to client_test_helpers_test.go so it can access test-only types (testServer, validAPIKey) defined in other _test.go files. Without this fix, the package fails to compile under `go test`.
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive CI workflow for the Go SDK and fixes a test helper file organization issue. The workflow follows the established pattern used by other SDK workflows in the repository (Python and TypeScript), providing automated quality checks for lint, tests, coverage, and build verification. The test helper file is renamed from client_test_helpers.go to client_test_helpers_test.go to properly scope these test utilities as test-only code using Go's _test.go naming convention.
Changes:
- Added GitHub Actions CI workflow for Go SDK with comprehensive quality checks
- Renamed test helpers file to follow Go testing conventions and enable proper compilation
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/sdk-go.yml | New CI workflow with lint (go vet + golangci-lint), tests across Go 1.21-1.23 with race detection, coverage reporting with job summary, and build verification with module tidiness checks |
| sdks/go/logwell/client_test_helpers_test.go | Test helper functions moved to properly named _test.go file, enabling these helpers to be used across test files in the same package while maintaining test-only scope |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Check go.mod is tidy | ||
| run: | | ||
| go mod tidy | ||
| git diff --exit-code go.mod |
There was a problem hiding this comment.
The git diff check only verifies go.mod but not go.sum. If dependencies are added in the future, running 'go mod tidy' may update both go.mod and go.sum. The check should verify both files to ensure the module files are properly maintained. Consider changing the diff command to 'git diff --exit-code go.mod go.sum' or 'git diff --exit-code -- .' to check all files in the working directory.
| git diff --exit-code go.mod | |
| git diff --exit-code go.mod go.sum |
Add GitHub Actions CI workflow for the Go SDK with lint (go vet + golangci-lint), tests across Go 1.21-1.23 with race detection, coverage reporting, and build verification.
Also rename client_test_helpers.go to client_test_helpers_test.go to fix compilation by allowing access to test-only declarations in other _test.go files.