ci: fix GitHub Actions workflows#1
Merged
Merged
Conversation
The go and golangci-lint workflows failed on every run:
- go.yml pinned Go 1.17/1.18, which current macOS runners can no longer
download (HTTP 403), cancelling the whole fail-fast matrix; it also used
deprecated checkout@v2 / setup-go@v2 and the retired codecov bash uploader.
- golangci-lint.yml read go-version from ${{ matrix.go }} while the matrix
defined go_version, so setup-go got an empty version and failed before
linting; it also pinned golangci-lint v1.42.1 and triggered on a
non-existent master branch.
Rewrite both: Ubuntu-only, pinned current Go (1.25/1.26), checkout@v4 +
setup-go@v5, codecov-action@v4 (soft-fail), and golangci-lint-action@v6 with
golangci-lint v2.12.2. Fix the two findings the newer linter surfaces:
check the deferred Body.Close() error, and suppress ST1012 on FeedEnd to keep
the public API name.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
golangci-lint-action v6 rejects golangci-lint v2 ("v2 is not supported by
golangci-lint-action v6, you must update to v7").
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The go.mod `go 1.18` directive conflicted with the Go 1.26 stdlib under govet (cannot inline ioutil.ReadAll declared using go1.26 into a go1.18 file). Bump the directive to 1.25 (the lower CI matrix leg). That surfaces the long-deprecated io/ioutil (SA1019), so switch ReadAll to io.ReadAll — behaviour-identical, no public API change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Both CI workflows failed on every run, so CI gave no signal:
1.17/1.18, which current macOS runners can no longer download (Failed to download version … 403); fail-fast then cancelled the green Ubuntu/Windows legs. Also used deprecatedactions/checkout@v2/actions/setup-go@v2and the retiredbash <(curl … codecov.io/bash)uploader.go-version: ${{ matrix.go }}while the matrix definedgo_version, sosetup-gogot an empty version and failed before linting. Also pinned golangci-lintv1.42.1and triggered on a non-existentmasterbranch.Changes
fail-fast: false, matrixgo: [ '1.25', '1.26' ](pinned for reproducibility),checkout@v4+setup-go@v5. Keeps theproxy.py/nginxservice containers andPROXY_URL/TARGET_URL, andgo test ./... -race -coverprofile=…. Coverage uploaded viacodecov-action@v4on the1.26leg withfail_ci_if_error: false(needs theCODECOV_TOKENsecret).setup-go@v5with a realgo-version: '1.26',golangci-lint-action@v6pinned tov2.12.2; drops themastertrigger.Body.Close()error (errcheck); suppress ST1012 on the exportedFeedEndsentinel via//nolintrather than renaming it.Notes
CODECOV_TOKENmust be set in repo secrets for coverage upload; until then the step soft-fails and never reds CI.🤖 Generated with Claude Code