Skip to content

ci: modernize the pipeline and bump the Go baseline - #2

Merged
memclutter merged 1 commit into
mainfrom
chore/modernize-ci
Aug 12, 2026
Merged

ci: modernize the pipeline and bump the Go baseline#2
memclutter merged 1 commit into
mainfrom
chore/modernize-ci

Conversation

@memclutter

Copy link
Copy Markdown
Owner

What

Ports the proxycheck CI template into this repo, so the whole memclutter
Go fleet shares one pipeline shape.

  • go.ymlactions/checkout@v4, actions/setup-go@v5, matrix
    1.25/1.26 across the existing ubuntu / windows / macOS spread, and
    codecov/codecov-action@v4 replacing bash <(curl -s https://codecov.io/bash).
  • golangci-lint.yml — new, a copy of proxycheck's, pinning golangci-lint
    v2.12.2 via golangci/golangci-lint-action@v7.
  • go.modgo 1.18go 1.25.
  • README.md — a golangci-lint badge alongside the CI one.

Why

The old matrix pinned Go 1.18/1.19, and those toolchains are no longer
downloadable for current runners. main has been red since June for exactly
that reason — not a flake, and not a code failure:

Acquiring go1.18.10 from .../go1.18.10.darwin-arm64.tar.gz
##[error]Failed to download version 1.18: Unexpected HTTP response: 403

macOS-latest is arm64 now. So the action bump and the go.mod bump have to
ship together; neither fixes the build alone.

Lint fallout

The new lint workflow reported 4 issues, all fixed here, all
behaviour-preserving:

finding fix
SA1019 io/ioutil deprecated (library + tests) io.ReadAll
S1011 Cookies() copy loop append(r.cookies, cookies...)
errcheck on defer res.Body.Close() defer func() { _ = res.Body.Close() }()

No API change, no behaviour change, and no test was modified beyond the
ioutilio swap — the existing suite is what proves the version bump is
safe.

Verification

Local, under the bumped go.mod (Go 1.25 fetched via GOTOOLCHAIN=auto):
go build ./..., go test -count=1 ./... -race (40 tests), golangci-lint run
clean, gofmt -l . empty. The real gate is this PR's 6 test jobs plus lint
in particular that macOS-latest now reaches the test step at all.

Note

The Codecov upload uses fail_ci_if_error: false, so if CODECOV_TOKEN is not
set in this repo the step degrades to a no-op rather than reddening the build.

🤖 Generated with Claude Code

Port the proxycheck CI template into this repo:

- go.yml moves to actions/checkout@v4 and actions/setup-go@v5, a
  1.25/1.26 Go matrix across the existing three OSes, and
  codecov/codecov-action@v4 instead of the deprecated piped-curl
  uploader. The old matrix pinned 1.18/1.19, whose toolchains are no
  longer downloadable: the macOS job had been failing in setup with
  403 on go1.18.10.darwin-arm64.tar.gz.
- golangci-lint.yml is new, a copy of proxycheck's, pinning
  golangci-lint v2.12.2 via golangci/golangci-lint-action@v7.
- go.mod declares go 1.25.

Lint findings from the new workflow, all behaviour-preserving:
io/ioutil replaced by io (SA1019, in both the library and its tests),
the Cookies copy loop replaced by a variadic append (S1011), and the
deferred res.Body.Close error explicitly discarded (errcheck).

No API or behaviour change.
@memclutter
memclutter merged commit 6ca31d4 into main Aug 12, 2026
7 checks passed
@memclutter
memclutter deleted the chore/modernize-ci branch August 12, 2026 13:53
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