From e097869bed35a6be03eba88a202d7ff85cc88c1f Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Tue, 12 Sep 2023 15:28:24 -0400 Subject: [PATCH 1/5] fix: install protobuf before running unit tests in CI Signed-off-by: Keran Yang --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aad64817..20dc4c3c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,5 +23,8 @@ jobs: - name: Get dependencies run: go mod download + - name: Install protobuf + run: brew install protobuf + - name: Test run: make all From 90a988a3f13a8079b6b5ad95dbe4a49d89991dcc Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Tue, 12 Sep 2023 15:31:41 -0400 Subject: [PATCH 2/5] . Signed-off-by: Keran Yang --- .github/workflows/ci.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 20dc4c3c..5d9e6734 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,8 +23,19 @@ jobs: - name: Get dependencies run: go mod download - - name: Install protobuf - run: brew install protobuf + - name: Install protoc + run: | + set -eux -o pipefail + PROTOC_VERSION=3.19.4 + PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip + curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP + sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc + sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' + sudo chmod +x /usr/local/bin/protoc + sudo find /usr/local/include -type f | xargs sudo chmod a+r + sudo find /usr/local/include -type d | xargs sudo chmod a+rx + rm -f $PROTOC_ZIP + ls /usr/local/include/google/protobuf/ - name: Test run: make all From 0f546874bdb19e310a87eb3e4d572fd308414424 Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Tue, 12 Sep 2023 15:34:22 -0400 Subject: [PATCH 3/5] . Signed-off-by: Keran Yang --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5d9e6734..768749e6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,5 +37,9 @@ jobs: rm -f $PROTOC_ZIP ls /usr/local/include/google/protobuf/ + - name: Install mockgen + run: | + go install github.com/golang/mock/mockgen + - name: Test run: make all From 4cd0c5bbdef504716ffb7852d3bbb95ceb20dd9e Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Tue, 12 Sep 2023 15:37:27 -0400 Subject: [PATCH 4/5] . Signed-off-by: Keran Yang --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 768749e6..17e62b2a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,7 +39,7 @@ jobs: - name: Install mockgen run: | - go install github.com/golang/mock/mockgen + go install github.com/golang/mock/mockgen@v1.6.0 - name: Test run: make all From 2595e9aa24fba9e80393c491a25df8e8bc25e918 Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Tue, 12 Sep 2023 15:43:23 -0400 Subject: [PATCH 5/5] x Signed-off-by: Keran Yang --- pkg/info/server_info_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/info/server_info_test.go b/pkg/info/server_info_test.go index f3a7e808..c30a7b65 100644 --- a/pkg/info/server_info_test.go +++ b/pkg/info/server_info_test.go @@ -52,7 +52,7 @@ func Test_WaitUntilReady(t *testing.T) { } func Test_Read_Write(t *testing.T) { - filepath := os.TempDir() + "server-info" + filepath := os.TempDir() + "/server-info" defer os.Remove(filepath) info := &ServerInfo{ Protocol: TCP,