ci: build the Go tools against the latest x/tools
- commit
- e225d7c03cc27508fe78d56c2bef17c269b8a367
- author
- brice · · 2026-10-09 04:09 UTC
- parent
- 7b9cc4c
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +7 -5
M .github/workflows/ci.yml +7 -5
| @@ -25,11 +25,13 @@ jobs: | |||
| 25 | 25 | persist-credentials: false | |
| 26 | 26 | - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| 27 | 27 | - run: | | |
| 28 | - | go install github.com/vektra/mockery/v3@v3.8.0 | |
| 29 | - | # staticcheck v0.8.1 pins an x/tools that cannot read Go 1.27.2 export | |
| 30 | - | # data; build it against a newer x/tools in a throwaway module. | |
| 31 | - | tools=$(mktemp -d) | |
| 32 | - | (cd "$tools" && go mod init tools && go get honnef.co/go/tools/cmd/staticcheck@v0.8.1 golang.org/x/tools@v0.51.0 && go install honnef.co/go/tools/cmd/staticcheck) | |
| 28 | + | # Build the tools against the latest x/tools so they can read the | |
| 29 | + | # export data of the Go release installed above. | |
| 30 | + | cd "$(mktemp -d)" | |
| 31 | + | go mod init tools | |
| 32 | + | go get -tool github.com/vektra/mockery/v3@v3.8.0 honnef.co/go/tools/cmd/staticcheck@latest | |
| 33 | + | go get golang.org/x/tools@latest | |
| 34 | + | go install tool | |
| 33 | 35 | echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" | |
| 34 | 36 | - run: make check | |
| 35 | 37 | - run: make race | |
| @@ -25,11 +25,13 @@ jobs: | |||||
| 25 | persist-credentials: false | 25 | persist-credentials: false | ||
| 26 | - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | 26 | - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
| 27 | - run: | | 27 | - run: | | ||
| 28 | - | go install github.com/vektra/mockery/v3@v3.8.0 | 28 | + | # Build the tools against the latest x/tools so they can read the |
| 29 | - | # staticcheck v0.8.1 pins an x/tools that cannot read Go 1.27.2 export | 29 | + | # export data of the Go release installed above. |
| 30 | - | # data; build it against a newer x/tools in a throwaway module. | 30 | + | cd "$(mktemp -d)" |
| 31 | - | tools=$(mktemp -d) | 31 | + | go mod init tools |
| 32 | - | (cd "$tools" && go mod init tools && go get honnef.co/go/tools/cmd/staticcheck@v0.8.1 golang.org/x/tools@v0.51.0 && go install honnef.co/go/tools/cmd/staticcheck) | 32 | + | go get -tool github.com/vektra/mockery/v3@v3.8.0 honnef.co/go/tools/cmd/staticcheck@latest |
| 33 | + | go get golang.org/x/tools@latest | |||
| 34 | + | go install tool | |||
| 33 | echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" | 35 | echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" | ||
| 34 | - run: make check | 36 | - run: make check | ||
| 35 | - run: make race | 37 | - run: make race | ||