diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index f1f45adfb53..9f2c0b1a4a5 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -128,10 +128,14 @@ jobs: with: go-version: "1.22" - - name: Run "make generate" and check for changes + - name: Run "go generate" and check for changes run: | set -e - sudo apt -qq -y -o=Dpkg::Use-Pty=0 install protobuf-compiler + # ensure the version of 'protoc' matches the one that generated the files + PROTOBUF_VERSION="21.10" + curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip + unzip protoc-${PROTOBUF_VERSION}-linux-x86_64.zip -d $HOME/.protoc + export PATH="$HOME/.protoc/bin:$PATH" go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 go generate ./...