fix(ci): govulncheck via go run; golangci-lint v2 module path + GOBIN - #3
Merged
Conversation
The first live dispatch showed the PR #2 fix was incomplete: - dependency-check: mise-action sets GOBIN to the mise toolchain dir (~/.local/share/mise/installs/go/<ver>/bin), so 'go install' + a GOPATH/bin PATH export still left govulncheck unresolvable (127). Use 'go run ...govulncheck@latest' instead — no PATH wiring needed. - latest-linter: go install without the /v2 module path resolves to the last golangci-lint v1 (@latest follows the module, and v2 lives at github.com/golangci/golangci-lint/v2), which rejects the repo's v2 config ('configuration file for golangci-lint v2 with v1'). Verified: installing with the /v2 path yields 2.12.2. PATH export now honors GOBIN (falls back to GOPATH/bin).
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.
The first live dispatch of the merged fix showed two residual issues (test job now passes — the flaky-test fix holds):
dependency-check — mise-action redirects
GOBINto the mise toolchain dir, sogo install+ aGOPATH/binPATH export still cannot find govulncheck (exit 127). Switch togo run golang.org/x/vuln/cmd/govulncheck@latest ./...— no PATH wiring needed (same pattern as ccr-models-usage).latest-linter —
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latestresolves to the last v1 (v2 lives at the/v2module path), and v1 rejects the repo's v2 config: "you are using a configuration file for golangci-lint v2 with golangci-lint v1". Verified locally:go install .../v2/cmd/golangci-lint@latest→ 2.12.2. PATH export now honorsGOBIN(fallbackGOPATH/bin).Verified: YAML valid; golangci-lint 2.12.2 build+run works locally; govulncheck go-run pattern proven in the sibling repo.