From 154cb06a8971746c0bec189871bc529ca7ac7e1a Mon Sep 17 00:00:00 2001 From: rbroggi Date: Thu, 28 Oct 2021 19:55:22 +0200 Subject: [PATCH 01/12] Issue #1516 https://github.com/jaegertracing/jaeger/issues/1516 * introduction of build tags [grpc_plugin_storage_integration, badger_storage_integration] for better control over badgerstore_test.go and grpc_test.go which being fairly light-weight can be run along with the main make target `test` Signed-off-by: rbroggi --- .github/workflows/ci-memory-badger.yml | 20 ------------------- Makefile | 14 +------------ examples/memstore-plugin/main.go | 2 ++ .../storage/integration/badgerstore_test.go | 6 ++---- plugin/storage/integration/grpc_test.go | 5 ++--- 5 files changed, 7 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/ci-memory-badger.yml diff --git a/.github/workflows/ci-memory-badger.yml b/.github/workflows/ci-memory-badger.yml deleted file mode 100644 index e459b6edff7..00000000000 --- a/.github/workflows/ci-memory-badger.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: CIT Memory And Badger - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - memory-badger: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.5 - - - uses: actions/setup-go@v2 - with: - go-version: ^1.17 - - - name: Run in-memory and badger integration tests - run: make mem-and-badger-storage-integration-test diff --git a/Makefile b/Makefile index a801188b479..f6c82748369 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ clean: .PHONY: test test: go-gen - bash -c "set -e; set -o pipefail; $(GOTEST) ./... | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration,grpc_plugin_storage_integration ./... | $(COLORIZE)" .PHONY: all-in-one-integration-test all-in-one-integration-test: go-gen @@ -97,18 +97,6 @@ storage-integration-test: go-gen go clean -testcache bash -c "set -e; set -o pipefail; $(GOTEST) $(STORAGE_PKGS) | $(COLORIZE)" -.PHONY: mem-and-badger-storage-integration-test -mem-and-badger-storage-integration-test: badger-storage-integration-test grpc-plugin-storage-integration-test - -.PHONY: badger-storage-integration-test -badger-storage-integration-test: - STORAGE=badger $(MAKE) storage-integration-test - -.PHONY: grpc-plugin-storage-integration-test -grpc-plugin-storage-integration-test: - (cd examples/memstore-plugin/ && go build .) - STORAGE=grpc-plugin $(MAKE) storage-integration-test - .PHONY: index-cleaner-integration-test index-cleaner-integration-test: docker-images-elastic # Expire test results for storage integration tests since the environment might change diff --git a/examples/memstore-plugin/main.go b/examples/memstore-plugin/main.go index 03ea1db8abf..b741ece1cd3 100644 --- a/examples/memstore-plugin/main.go +++ b/examples/memstore-plugin/main.go @@ -11,6 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +//go:build grpc_plugin_storage_integration +// +build grpc_plugin_storage_integration package main diff --git a/plugin/storage/integration/badgerstore_test.go b/plugin/storage/integration/badgerstore_test.go index 6c2ee01affd..3aeb2b058dc 100644 --- a/plugin/storage/integration/badgerstore_test.go +++ b/plugin/storage/integration/badgerstore_test.go @@ -11,11 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +//go:build badger_storage_integration +// +build badger_storage_integration package integration import ( - "os" "testing" assert "github.com/stretchr/testify/require" @@ -80,9 +81,6 @@ func (s *BadgerIntegrationStorage) refresh() error { } func TestBadgerStorage(t *testing.T) { - if os.Getenv("STORAGE") != "badger" { - t.Skip("Integration test against Badger skipped; set STORAGE env var to badger to run this") - } s := &BadgerIntegrationStorage{} assert.NoError(t, s.initialize()) s.IntegrationTestAll(t) diff --git a/plugin/storage/integration/grpc_test.go b/plugin/storage/integration/grpc_test.go index e9b1e2eb367..d202fa89281 100644 --- a/plugin/storage/integration/grpc_test.go +++ b/plugin/storage/integration/grpc_test.go @@ -12,6 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +//go:build grpc_plugin_storage_integration +// +build grpc_plugin_storage_integration package integration @@ -86,9 +88,6 @@ func (s *GRPCStorageIntegrationTestSuite) cleanUp() error { } func TestGRPCStorage(t *testing.T) { - if os.Getenv("STORAGE") != "grpc-plugin" { - t.Skip("Integration test against grpc skipped; set STORAGE env var to grpc-plugin to run this") - } binaryPath := os.Getenv("PLUGIN_BINARY_PATH") if binaryPath == "" { t.Logf("PLUGIN_BINARY_PATH env var not set, using %s", defaultPluginBinaryPath) From c63d9ae2c8384dd3eb61f2545c73e235d2af1349 Mon Sep 17 00:00:00 2001 From: rbroggi Date: Fri, 29 Oct 2021 18:28:57 +0200 Subject: [PATCH 02/12] eliminate the build tag from the binary compilation Signed-off-by: rbroggi --- examples/memstore-plugin/main.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/memstore-plugin/main.go b/examples/memstore-plugin/main.go index b741ece1cd3..03ea1db8abf 100644 --- a/examples/memstore-plugin/main.go +++ b/examples/memstore-plugin/main.go @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build grpc_plugin_storage_integration -// +build grpc_plugin_storage_integration package main From 95675b3a79446a58b316dc054c4376d4182351f5 Mon Sep 17 00:00:00 2001 From: rbroggi Date: Fri, 29 Oct 2021 21:10:59 +0200 Subject: [PATCH 03/12] Including memstore as test to be run as part of regular tests Signed-off-by: rbroggi --- Makefile | 2 +- plugin/storage/integration/memstore_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f6c82748369..3144ad1c20c 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ clean: .PHONY: test test: go-gen - bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration,grpc_plugin_storage_integration ./... | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration ./... | $(COLORIZE)" .PHONY: all-in-one-integration-test all-in-one-integration-test: go-gen diff --git a/plugin/storage/integration/memstore_test.go b/plugin/storage/integration/memstore_test.go index 4c497748821..1271d22173f 100644 --- a/plugin/storage/integration/memstore_test.go +++ b/plugin/storage/integration/memstore_test.go @@ -12,6 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +//go:build memory_storage_integration +// +build memory_storage_integration package integration From 352bda3b37b1d40be55821de05bc974b66817c9e Mon Sep 17 00:00:00 2001 From: rbroggi Date: Sat, 30 Oct 2021 12:53:28 +0200 Subject: [PATCH 04/12] Coverability decreases due to missing tags in `cover` make target Signed-off-by: rbroggi --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3144ad1c20c..c99776b7570 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ endif GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) GOBUILD=CGO_ENABLED=0 installsuffix=cgo go build -trimpath -GOTEST=go test -v $(RACE) +GOTEST=go test -v $(RACE) -tags=badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration GOFMT=gofmt FMT_LOG=.fmt.log IMPORT_LOG=.import.log @@ -84,7 +84,7 @@ clean: .PHONY: test test: go-gen - bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration ./... | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) ./... | $(COLORIZE)" .PHONY: all-in-one-integration-test all-in-one-integration-test: go-gen From d0411c81f30dcaccda5f651e873d26aee7ec6087 Mon Sep 17 00:00:00 2001 From: rbroggi Date: Sat, 30 Oct 2021 12:59:52 +0200 Subject: [PATCH 05/12] New build tags `badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration` should be present in `cover` profile and in `test` profile. Signed-off-by: rbroggi --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c99776b7570..adc4b4b14be 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ endif GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) GOBUILD=CGO_ENABLED=0 installsuffix=cgo go build -trimpath -GOTEST=go test -v $(RACE) -tags=badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration +GOTEST=go test -v $(RACE) GOFMT=gofmt FMT_LOG=.fmt.log IMPORT_LOG=.import.log @@ -84,7 +84,7 @@ clean: .PHONY: test test: go-gen - bash -c "set -e; set -o pipefail; $(GOTEST) ./... | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration ./... | $(COLORIZE)" .PHONY: all-in-one-integration-test all-in-one-integration-test: go-gen @@ -124,7 +124,7 @@ all-srcs: .PHONY: cover cover: nocover - $(GOTEST) -timeout 5m -coverprofile cover.out ./... + $(GOTEST) -tags=badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration -timeout 5m -coverprofile cover.out ./... grep -E -v 'model.pb.*.go' cover.out > cover-nogen.out mv cover-nogen.out cover.out go tool cover -html=cover.out -o cover.html From 9721d17710c721ced37b56a686d06160d0845efe Mon Sep 17 00:00:00 2001 From: rbroggi Date: Sat, 30 Oct 2021 15:40:13 +0200 Subject: [PATCH 06/12] unifying the build-tags of cheap integration tests Signed-off-by: rbroggi --- Makefile | 4 ++-- plugin/storage/integration/badgerstore_test.go | 4 ++-- plugin/storage/integration/grpc_test.go | 4 ++-- plugin/storage/integration/memstore_test.go | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index adc4b4b14be..63193479b6f 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ clean: .PHONY: test test: go-gen - bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration ./... | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=cheap_storage_integration ./... | $(COLORIZE)" .PHONY: all-in-one-integration-test all-in-one-integration-test: go-gen @@ -124,7 +124,7 @@ all-srcs: .PHONY: cover cover: nocover - $(GOTEST) -tags=badger_storage_integration,grpc_plugin_storage_integration,memory_storage_integration -timeout 5m -coverprofile cover.out ./... + $(GOTEST) -tags=cheap_storage_integration -timeout 5m -coverprofile cover.out ./... grep -E -v 'model.pb.*.go' cover.out > cover-nogen.out mv cover-nogen.out cover.out go tool cover -html=cover.out -o cover.html diff --git a/plugin/storage/integration/badgerstore_test.go b/plugin/storage/integration/badgerstore_test.go index 3aeb2b058dc..32d8ac8d302 100644 --- a/plugin/storage/integration/badgerstore_test.go +++ b/plugin/storage/integration/badgerstore_test.go @@ -11,8 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build badger_storage_integration -// +build badger_storage_integration +//go:build cheap_storage_integration +// +build cheap_storage_integration package integration diff --git a/plugin/storage/integration/grpc_test.go b/plugin/storage/integration/grpc_test.go index d202fa89281..b7f5039d774 100644 --- a/plugin/storage/integration/grpc_test.go +++ b/plugin/storage/integration/grpc_test.go @@ -12,8 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build grpc_plugin_storage_integration -// +build grpc_plugin_storage_integration +//go:build cheap_storage_integration +// +build cheap_storage_integration package integration diff --git a/plugin/storage/integration/memstore_test.go b/plugin/storage/integration/memstore_test.go index 1271d22173f..19bc2f3b4ca 100644 --- a/plugin/storage/integration/memstore_test.go +++ b/plugin/storage/integration/memstore_test.go @@ -12,8 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build memory_storage_integration -// +build memory_storage_integration +//go:build cheap_storage_integration +// +build cheap_storage_integration package integration From f519277c747a3ebd6be318c843154b263fdec188 Mon Sep 17 00:00:00 2001 From: rbroggi Date: Sat, 30 Oct 2021 16:49:48 +0200 Subject: [PATCH 07/12] * bundling grpc and badger tests into single tag for execution * including memory-integration-storage as a cheap integration test to run along with `make test` * adapt the name of the ci workflow Signed-off-by: rbroggi --- .github/workflows/ci-grpc-badger.yml | 20 +++++++++++++++++++ Makefile | 5 +++++ .../storage/integration/badgerstore_test.go | 4 ++-- plugin/storage/integration/grpc_test.go | 4 ++-- 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci-grpc-badger.yml diff --git a/.github/workflows/ci-grpc-badger.yml b/.github/workflows/ci-grpc-badger.yml new file mode 100644 index 00000000000..fb0079bb20c --- /dev/null +++ b/.github/workflows/ci-grpc-badger.yml @@ -0,0 +1,20 @@ +name: CIT gRPC And Badger + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + memory-badger: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.5 + + - uses: actions/setup-go@v2 + with: + go-version: ^1.17 + + - name: Run grpc and badger integration tests + run: make grpc-and-badger-storage-integration-test diff --git a/Makefile b/Makefile index 63193479b6f..fda59498065 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,11 @@ storage-integration-test: go-gen go clean -testcache bash -c "set -e; set -o pipefail; $(GOTEST) $(STORAGE_PKGS) | $(COLORIZE)" +.PHONY: grpc-and-badger-storage-integration-test +grpc-and-badger-storage-integration-test: + (cd examples/memstore-plugin/ && go build .) + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=grpc_badger_storage_integration ./... | $(COLORIZE)" + .PHONY: index-cleaner-integration-test index-cleaner-integration-test: docker-images-elastic # Expire test results for storage integration tests since the environment might change diff --git a/plugin/storage/integration/badgerstore_test.go b/plugin/storage/integration/badgerstore_test.go index 32d8ac8d302..fe80e7dc993 100644 --- a/plugin/storage/integration/badgerstore_test.go +++ b/plugin/storage/integration/badgerstore_test.go @@ -11,8 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build cheap_storage_integration -// +build cheap_storage_integration +//go:build grpc_badger_storage_integration +// +build grpc_badger_storage_integration package integration diff --git a/plugin/storage/integration/grpc_test.go b/plugin/storage/integration/grpc_test.go index b7f5039d774..b35ebd23654 100644 --- a/plugin/storage/integration/grpc_test.go +++ b/plugin/storage/integration/grpc_test.go @@ -12,8 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build cheap_storage_integration -// +build cheap_storage_integration +//go:build grpc_badger_storage_integration +// +build grpc_badger_storage_integration package integration From b92751259be14663249b4f55fe96e8da42b7c96d Mon Sep 17 00:00:00 2001 From: rbroggi Date: Sat, 30 Oct 2021 16:54:28 +0200 Subject: [PATCH 08/12] * changing compilation tag from cheap_storage_integration to memory_storage_integration Signed-off-by: rbroggi --- Makefile | 4 ++-- plugin/storage/integration/memstore_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fda59498065..fc8b92c1d54 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ clean: .PHONY: test test: go-gen - bash -c "set -e; set -o pipefail; $(GOTEST) -tags=cheap_storage_integration ./... | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=memory_storage_integration ./... | $(COLORIZE)" .PHONY: all-in-one-integration-test all-in-one-integration-test: go-gen @@ -129,7 +129,7 @@ all-srcs: .PHONY: cover cover: nocover - $(GOTEST) -tags=cheap_storage_integration -timeout 5m -coverprofile cover.out ./... + $(GOTEST) -tags=memory_storage_integration -timeout 5m -coverprofile cover.out ./... grep -E -v 'model.pb.*.go' cover.out > cover-nogen.out mv cover-nogen.out cover.out go tool cover -html=cover.out -o cover.html diff --git a/plugin/storage/integration/memstore_test.go b/plugin/storage/integration/memstore_test.go index 19bc2f3b4ca..1271d22173f 100644 --- a/plugin/storage/integration/memstore_test.go +++ b/plugin/storage/integration/memstore_test.go @@ -12,8 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build cheap_storage_integration -// +build cheap_storage_integration +//go:build memory_storage_integration +// +build memory_storage_integration package integration From f3f8ce79f1ef5fd1d2206568fff38fbd907a4c73 Mon Sep 17 00:00:00 2001 From: rbroggi Date: Sat, 30 Oct 2021 17:09:39 +0200 Subject: [PATCH 09/12] Avoid running all unit-tests in the `grpc-and-badger-storage-integration-test` Signed-off-by: rbroggi --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fc8b92c1d54..208548fa129 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ storage-integration-test: go-gen .PHONY: grpc-and-badger-storage-integration-test grpc-and-badger-storage-integration-test: (cd examples/memstore-plugin/ && go build .) - bash -c "set -e; set -o pipefail; $(GOTEST) -tags=grpc_badger_storage_integration ./... | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=grpc_badger_storage_integration $(STORAGE_PKGS) | $(COLORIZE)" .PHONY: index-cleaner-integration-test index-cleaner-integration-test: docker-images-elastic From 9cc21d8c3d09e947543fd121f67f4fa3bc3775ad Mon Sep 17 00:00:00 2001 From: rbroggi Date: Sat, 30 Oct 2021 20:37:20 +0200 Subject: [PATCH 10/12] renaming the github action step Signed-off-by: rbroggi --- .github/workflows/ci-grpc-badger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-grpc-badger.yml b/.github/workflows/ci-grpc-badger.yml index fb0079bb20c..f8127f2ab6b 100644 --- a/.github/workflows/ci-grpc-badger.yml +++ b/.github/workflows/ci-grpc-badger.yml @@ -16,5 +16,5 @@ jobs: with: go-version: ^1.17 - - name: Run grpc and badger integration tests + - name: Run grpc and badger storage integration tests run: make grpc-and-badger-storage-integration-test From bf916f3fdf57afbdc2ad36082f7f3b800e014403 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sat, 30 Oct 2021 17:17:08 -0400 Subject: [PATCH 11/12] use independent tags Signed-off-by: Yuri Shkuro --- Makefile | 2 +- plugin/storage/integration/badgerstore_test.go | 4 ++-- plugin/storage/integration/grpc_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 208548fa129..77c733c699f 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ storage-integration-test: go-gen .PHONY: grpc-and-badger-storage-integration-test grpc-and-badger-storage-integration-test: (cd examples/memstore-plugin/ && go build .) - bash -c "set -e; set -o pipefail; $(GOTEST) -tags=grpc_badger_storage_integration $(STORAGE_PKGS) | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration,grpc_storage_integration $(STORAGE_PKGS) | $(COLORIZE)" .PHONY: index-cleaner-integration-test index-cleaner-integration-test: docker-images-elastic diff --git a/plugin/storage/integration/badgerstore_test.go b/plugin/storage/integration/badgerstore_test.go index fe80e7dc993..3aeb2b058dc 100644 --- a/plugin/storage/integration/badgerstore_test.go +++ b/plugin/storage/integration/badgerstore_test.go @@ -11,8 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build grpc_badger_storage_integration -// +build grpc_badger_storage_integration +//go:build badger_storage_integration +// +build badger_storage_integration package integration diff --git a/plugin/storage/integration/grpc_test.go b/plugin/storage/integration/grpc_test.go index b35ebd23654..2e16b6ec960 100644 --- a/plugin/storage/integration/grpc_test.go +++ b/plugin/storage/integration/grpc_test.go @@ -12,8 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -//go:build grpc_badger_storage_integration -// +build grpc_badger_storage_integration +//go:build grpc_storage_integration +// +build grpc_storage_integration package integration From 569d5bda359785473f699dc77b00e455ff6e5904 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sat, 30 Oct 2021 17:19:29 -0400 Subject: [PATCH 12/12] split grpc/badger more Signed-off-by: Yuri Shkuro --- .github/workflows/ci-grpc-badger.yml | 11 ++++++++--- Makefile | 10 +++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-grpc-badger.yml b/.github/workflows/ci-grpc-badger.yml index f8127f2ab6b..ace2692234f 100644 --- a/.github/workflows/ci-grpc-badger.yml +++ b/.github/workflows/ci-grpc-badger.yml @@ -7,7 +7,7 @@ on: branches: [ master ] jobs: - memory-badger: + grpc-and-badger: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.5 @@ -16,5 +16,10 @@ jobs: with: go-version: ^1.17 - - name: Run grpc and badger storage integration tests - run: make grpc-and-badger-storage-integration-test + - name: Run Badger storage integration tests + run: make badger-storage-integration-test + + - name: Run gRPC storage integration tests + run: make grpc-storage-integration-test + +# TODO add code coverage reporting diff --git a/Makefile b/Makefile index 77c733c699f..9a22b7704fb 100644 --- a/Makefile +++ b/Makefile @@ -97,10 +97,14 @@ storage-integration-test: go-gen go clean -testcache bash -c "set -e; set -o pipefail; $(GOTEST) $(STORAGE_PKGS) | $(COLORIZE)" -.PHONY: grpc-and-badger-storage-integration-test -grpc-and-badger-storage-integration-test: +.PHONY: badger-storage-integration-test +badger-storage-integration-test: + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration $(STORAGE_PKGS) | $(COLORIZE)" + +.PHONY: grpc-storage-integration-test +grpc-storage-integration-test: (cd examples/memstore-plugin/ && go build .) - bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration,grpc_storage_integration $(STORAGE_PKGS) | $(COLORIZE)" + bash -c "set -e; set -o pipefail; $(GOTEST) -tags=grpc_storage_integration $(STORAGE_PKGS) | $(COLORIZE)" .PHONY: index-cleaner-integration-test index-cleaner-integration-test: docker-images-elastic