From 8ba4c33eec38e08b0a1523acd91c68543e7c5e8a Mon Sep 17 00:00:00 2001 From: kwasniew Date: Wed, 22 Nov 2023 13:02:33 +0100 Subject: [PATCH] test: separate specification tests from race conditions tests --- .github/workflows/build.yml | 4 ++-- Makefile | 2 +- internal/strategies/gradual_rollout_random_test.go | 1 + spec_test.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 651949d..a441879 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,10 +26,10 @@ jobs: - name: Go vet run: go vet ./... - name: Run spec tests - run: go test -v ./... -tags='spec' + run: go test -v ./... -tags='norace' - name: Run all tests with race detection timeout-minutes: 1 - run: go test -race -covermode atomic -coverprofile=profile.cov -v ./... -tags='!spec' + run: go test -race -covermode atomic -coverprofile=profile.cov -v ./... -tags='!norace' - name: Send coverage uses: shogo82148/actions-goveralls@v1 with: diff --git a/Makefile b/Makefile index 34145da..4651b4a 100644 --- a/Makefile +++ b/Makefile @@ -25,4 +25,4 @@ test: check go test ./... test-race: check - go test -race ./... -tags='!spec' + go test -race ./... -tags='!norace' diff --git a/internal/strategies/gradual_rollout_random_test.go b/internal/strategies/gradual_rollout_random_test.go index 16ca57e..088b415 100644 --- a/internal/strategies/gradual_rollout_random_test.go +++ b/internal/strategies/gradual_rollout_random_test.go @@ -1,3 +1,4 @@ +// +build norace package strategies import ( diff --git a/spec_test.go b/spec_test.go index 416366e..a2a19ce 100644 --- a/spec_test.go +++ b/spec_test.go @@ -1,4 +1,4 @@ -// +build spec +// +build norace package unleash