diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c50de313cb..10b79f0dd4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -65,7 +65,13 @@ jobs: with: redis-version: ${{ matrix.redis }} - - name: Install client dependencies + - name: Install tools for Go 1.18 + if: ${{ matrix.go == '1.18' }} + working-directory: ./go + run: make install-tools-go1.18 + + - name: Install tools for Go 1.21 + if: ${{ matrix.go == '1.21' }} working-directory: ./go run: make install-tools @@ -140,7 +146,13 @@ jobs: echo "/usr/local/go/bin" >> $GITHUB_PATH echo "$HOME/go/bin" >> $GITHUB_PATH - - name: Install client dependencies + - name: Install tools for Go 1.18 + if: ${{ matrix.go == '1.18.10' }} + working-directory: ./go + run: make install-tools-go1.18 + + - name: Install tools for Go 1.21 + if: ${{ matrix.go == '1.21.6' }} working-directory: ./go run: make install-tools diff --git a/go/Makefile b/go/Makefile index a6e553d604..b91dd855aa 100644 --- a/go/Makefile +++ b/go/Makefile @@ -1,11 +1,16 @@ +install-tools-go1.18: + go install github.com/vakenbolt/go-test-report@v0.9.3 + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.32.0 + go install mvdan.cc/gofumpt@v0.4.0 + go install golang.org/x/tools/cmd/goimports@v0.18.0 + go install honnef.co/go/tools/cmd/staticcheck@v0.4.6 + install-tools: go install github.com/vakenbolt/go-test-report@v0.9.3 go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.32.0 go install mvdan.cc/gofumpt@v0.6.0 go install golang.org/x/tools/cmd/goimports@v0.18.0 - go_minor=$$(go version | sed 's/.* go\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'); \ - if [ "$$go_minor" -eq 18 ]; then staticcheck_version=v0.3.3; else staticcheck_version=v0.4.6; fi; \ - go install honnef.co/go/tools/cmd/staticcheck@$$staticcheck_version + go install honnef.co/go/tools/cmd/staticcheck@v0.3.3 build: build-glide-core build-glide-client generate-protobuf go build ./...