Skip to content

ci: add CI workflow, update tooling to Go 1.24.3, fix lint issues#24

Draft
ntalfer wants to merge 10 commits into
masterfrom
ci
Draft

ci: add CI workflow, update tooling to Go 1.24.3, fix lint issues#24
ntalfer wants to merge 10 commits into
masterfrom
ci

Conversation

@ntalfer

@ntalfer ntalfer commented May 12, 2026

Copy link
Copy Markdown
  • Add .github/workflows/ci.yml with build, lint, and test jobs
  • Add mise.toml to manage Go version (1.24.3, matching real Dockerfile)
  • Update go.mod to Go 1.24.3
  • Fix Makefile deps target: use go install instead of deprecated go get
  • Upgrade golangci-lint to v2.12.2 and update .golangci.yml config
  • Replace deprecated ioutil with io/os equivalents
  • Replace strings.Replace with strings.ReplaceAll
  • Remove deprecated rand.Seed calls (auto-seeded since Go 1.20)
  • Fix superfluous-else, unreachable code, and printf format strings

- Add .github/workflows/ci.yml with build, lint, and test jobs
- Add mise.toml to manage Go version (1.24.3, matching real Dockerfile)
- Update go.mod to Go 1.24.3
- Fix Makefile deps target: use go install instead of deprecated go get
- Upgrade golangci-lint to v2.12.2 and update .golangci.yml config
- Replace deprecated ioutil with io/os equivalents
- Replace strings.Replace with strings.ReplaceAll
- Remove deprecated rand.Seed calls (auto-seeded since Go 1.20)
- Fix superfluous-else, unreachable code, and printf format strings

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@ntalfer ntalfer requested a review from a team as a code owner May 12, 2026 07:17
ntalfer and others added 2 commits May 12, 2026 09:21
Replace run.exclude-dirs (invalid in v2) with linters.exclusions.paths
and formatters.exclusions.paths as per v2 documentation.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
go mod tidy fails because generated packages don't exist yet at that
point. go.mod and go.sum are already committed and up to date.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@ntalfer ntalfer marked this pull request as draft May 12, 2026 07:26
ntalfer and others added 7 commits May 12, 2026 09:27
golangci-lint v2.12.2 requires Go 1.25+ which conflicts with our Go
1.24.3. The official action installs a pre-built binary and avoids
the version mismatch entirely.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Use prod-linux-s runner
- Switch to doctolib/actions/checkout and setup-go
- Use reviewdog/action-golangci-lint for lint (avoids Go version conflict)
- Set explicit GOCACHE/GOMODCACHE
- Add concurrency group to cancel stale runs

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Use postgres:15 matching staging (aurora 15.13). Tests are enabled
via TEST_POSTGRESQL_URI env var.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
prod-linux-s is a self-hosted runner not available to public repos.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
doctolib/actions/* are not accessible from public repos.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- pg_isready was using root instead of mailhog user
- TEST_FLAGS=-v makes individual test names visible in CI logs

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Makefile := overrides env vars. Use ?= so Make CLI args take precedence,
and pass TEST_FLAGS=-v directly as a Make argument in CI.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <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.

1 participant