ci: take the Go version from go.mod, not an older pin

This workflow pinned a Go older than the `go` directive in go.mod, and the job
image sets GOTOOLCHAIN=local — so the toolchain cannot fetch a newer one and the
build refuses before compiling anything:

    go: go.mod requires go >= X (running go Y; GOTOOLCHAIN=local)

go-version-file reads the requirement from go.mod, so the two cannot drift apart
the next time the module moves.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-02 02:28:35 -07:00
co-authored by Hanzo Dev
parent b80433ce51
commit 56c9343922
+6 -1
View File
@@ -51,10 +51,15 @@ jobs:
steps:
- uses: actions/checkout@v4
# go-version-file, not a pinned version: this pin was older than the go
# directive in go.mod, and the job image sets GOTOOLCHAIN=local — so the
# build refuses before compiling:
# go: go.mod requires go >= X (running go Y; GOTOOLCHAIN=local)
# Reading the version from go.mod keeps the two from drifting again.
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version-file: go.mod
cache-dependency-path: sdk/lx-trading-go/go.sum
- name: Download dependencies