Skip to content

ci(sdk-go): add CI workflow and fix test helper#21

Closed
Divkix wants to merge 1 commit intomainfrom
Divkix/tacoma
Closed

ci(sdk-go): add CI workflow and fix test helper#21
Divkix wants to merge 1 commit intomainfrom
Divkix/tacoma

Conversation

@Divkix
Copy link
Owner

@Divkix Divkix commented Feb 27, 2026

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.

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`.
Copilot AI review requested due to automatic review settings February 27, 2026 00:10
@Divkix Divkix closed this Feb 27, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
git diff --exit-code go.mod
git diff --exit-code go.mod go.sum

Copilot uses AI. Check for mistakes.
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.

2 participants