Skip to content

fix: checkout before setup-go, pin go-version-file to avoid golangci-lint version mismatch - #308

Merged
JamieSinn merged 1 commit into
mainfrom
fix/lint-workflow-go-version
May 8, 2026
Merged

JamieSinn merged 1 commit into
mainfrom
fix/lint-workflow-go-version

Conversation

@jonathannorris

Copy link
Copy Markdown
Member

Summary

  • actions/checkout was running after actions/setup-go, so go.mod didn't exist when setup-go tried to read it with go-version-file
  • Swapped step order so checkout runs first
  • Changed go-version: stable to go-version-file: go.mod so lint always runs against the Go version declared in the module, avoiding mismatches when the stable Go release moves ahead of the version golangci-lint was built with (currently causes a file requires newer Go version go1.26 (application built with go1.24) typecheck error)

Copilot AI review requested due to automatic review settings May 6, 2026 20:36
@jonathannorris
jonathannorris requested a review from a team as a code owner May 6, 2026 20:36
@jonathannorris
jonathannorris requested a review from JamieSinn May 6, 2026 20:37

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the Go lint GitHub Actions workflow to ensure the repository is checked out before Go setup runs, and to ensure the Go toolchain version used for linting matches the version declared by the module.

Changes:

  • Move actions/checkout@v4 before actions/setup-go@v5 so go.mod is available when configuring Go.
  • Switch from go-version: stable to go-version-file: go.mod so lint runs against the module’s declared Go version.

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

@JamieSinn
JamieSinn merged commit fc9cae1 into main May 8, 2026
16 checks passed
@JamieSinn
JamieSinn deleted the fix/lint-workflow-go-version branch May 8, 2026 15:52
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.

3 participants