Skip to content

feat: add Go SDK CI pipeline (sdk-go.yml)#23

Merged
Divkix merged 15 commits intomainfrom
worktree-squishy-greeting-melody
Feb 27, 2026
Merged

feat: add Go SDK CI pipeline (sdk-go.yml)#23
Divkix merged 15 commits intomainfrom
worktree-squishy-greeting-melody

Conversation

@Divkix
Copy link
Owner

@Divkix Divkix commented Feb 27, 2026

Summary

  • Add GitHub Actions CI workflow for Go SDK at sdks/go/ with 4 parallel jobs: lint (golangci-lint v2), test matrix (Go 1.25.x + stable with race detector), coverage reporting to PR summary, and ci-success gate for branch protection
  • Add .golangci.yml v2 config with 9 linters (errcheck, govet, staticcheck, unused, gosimple, ineffassign, gocritic, revive, misspell)
  • Bump sdks/go/go.mod minimum from Go 1.21 to 1.25 (1.24 EOL Feb 2026)

Key technical decisions

  • GOTOOLCHAIN=local prevents Go auto-upgrade defeating version matrix
  • -covermode=atomic with -race avoids false positive race reports
  • -count=1 bypasses stale Go test cache in CI
  • golangci-lint-action gets working-directory in with: block (action ignores job defaults.run)
  • ci-success gate with if: always() prevents path-filtered workflows from permanently blocking non-Go PRs

Test plan

  • Push a change to sdks/go/ and verify workflow triggers
  • Push a change to non-Go files and verify workflow does NOT trigger
  • Verify lint job produces PR annotations on lint errors
  • Verify test matrix runs on both Go 1.25.x and stable
  • Verify coverage percentage appears in PR summary
  • Verify ci-success gate passes when all jobs succeed

- Plan 01: golangci-lint v2 config + go.mod bump (LINT-02, LINT-04)
- Plan 02: sdk-go.yml workflow (TRIG-01-04, LINT-01/03, TEST-01-04, COV-01-03, INFR-01-04)
- Add sdks/go/.golangci.yml with version: "2" top-level key
- Enable standard linter set: errcheck, govet, staticcheck, unused,
  gosimple, ineffassign, gocritic, revive, misspell
- Add gofmt formatter in v2 formatters section
- Bump go.mod minimum from 1.21 to 1.25 (align with test matrix)
- Run go mod tidy for consistency

Requirements: LINT-02, LINT-04
- Path-filtered triggers for sdks/go/** and workflow file itself
- Push to main, PR, and manual dispatch triggers
- Concurrency group with cancel-in-progress
- Lint job: golangci-lint v2.10.1 via action@v9 with explicit
  working-directory in with: block (action ignores defaults.run)
- Test matrix: Go 1.25.x and 1.26.x with fail-fast: false
- Race detection (-race) and cache bypass (-count=1) on all test runs
- GOTOOLCHAIN=local at workflow env level to prevent auto-upgrade
- Coverage: -covermode=atomic (required with -race), summary to
  GITHUB_STEP_SUMMARY, artifact upload via upload-artifact@v6
- ci-success gate job: if: always(), accepts success + skipped
  results for branch protection compatibility with path filters
- All jobs: timeout-minutes 10, setup-go@v6 with monorepo cache path

Requirements: TRIG-01, TRIG-02, TRIG-03, TRIG-04, LINT-01, LINT-03,
TEST-01, TEST-02, TEST-03, TEST-04, COV-01, COV-02, COV-03,
INFR-01, INFR-02, INFR-03, INFR-04
- Create SUMMARY.md for both plans with frontmatter
- Update STATE.md: plan 2/2, progress 100%, velocity metrics
- Update ROADMAP.md: Phase 1 marked complete
- Mark all 19 requirements (TRIG, LINT, TEST, COV, INFR) complete
- VERIFICATION.md: 19/19 requirements, 5/5 success criteria, 7/7 pitfalls
- ROADMAP.md: Phase 1 marked complete with date
- STATE.md: Advanced to completion
- REQUIREMENTS.md: All 19 requirements marked complete
Copilot AI review requested due to automatic review settings February 27, 2026 02:07
Archive roadmap and requirements to .planning/milestones/v1.0-*.
Update PROJECT.md with validated requirements and key decisions.
Delete originals (fresh for next milestone).

19/19 requirements complete. 1 phase, 2 plans.
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 GitHub Actions CI pipeline for the Go SDK at sdks/go/. The implementation includes golangci-lint v2 configuration, a multi-job workflow with linting, testing across Go versions with race detection, coverage reporting, and a ci-success gate for branch protection. The PR also includes extensive planning and research documentation.

Changes:

  • Added GitHub Actions workflow sdk-go.yml with 4 parallel jobs (lint, test matrix, coverage, ci-success gate)
  • Created golangci-lint v2 configuration file with 9 linters and gofmt formatter
  • Bumped go.mod minimum Go version from 1.21 to 1.25
  • Added comprehensive planning and research documentation

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/sdk-go.yml Complete CI workflow with path filtering, parallel jobs for lint/test/coverage, and branch protection gate
sdks/go/.golangci.yml golangci-lint v2 configuration with 9 enabled linters and formatter settings
sdks/go/go.mod Go version requirement bumped from 1.21 to 1.25
.planning/research/* Comprehensive research documentation covering stack, architecture, pitfalls, and features
.planning/phases/* Detailed phase planning, execution summaries, and verification documents
.planning/* Project definition, requirements, roadmap, and state tracking files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Remove `gosimple` linter from .golangci.yml (merged into `staticcheck`
  in golangci-lint v2, was causing "unknown linters" fatal error)
- Rename client_test_helpers.go → client_test_helpers_test.go (file
  referenced test-only symbols `testServer`/`validAPIKey` but wasn't
  a _test.go file, causing compilation failures)
- Add linter exclusion rules for test files (errcheck on deferred
  Shutdown calls, revive unused-parameter on HTTP handler signatures)
- Fix unchecked resp.Body.Close in transport.go (production errcheck)
- Fix nil context passed to Shutdown in test helper (staticcheck SA1012)
- Run gofmt on test files with formatting drift
- Remove cache-dependency-path from workflow (no go.sum exists)
- Restore trailing newline in .planning/config.json (biome format check)
@gitguardian
Copy link

gitguardian bot commented Feb 27, 2026

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
25017662 Triggered Generic High Entropy Secret 47d7910 sdks/go/logwell/config_test.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@Divkix Divkix merged commit 4f56087 into main Feb 27, 2026
15 checks passed
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