diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f20dd7d..3dec5d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,9 +25,11 @@ jobs: run: go get -t -v ./... - name: Go vet run: go vet ./... - - name: Run all tests + - name: Run spec tests + 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 ./... + 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 39119af..4651b4a 100644 --- a/Makefile +++ b/Makefile @@ -25,4 +25,4 @@ test: check go test ./... test-race: check - go test -race ./... + go test -race ./... -tags='!norace' diff --git a/internal/strategies/flexible_rollout_test.go b/internal/strategies/flexible_rollout_test.go index 57f9e6b..7221968 100644 --- a/internal/strategies/flexible_rollout_test.go +++ b/internal/strategies/flexible_rollout_test.go @@ -1,3 +1,5 @@ +// +build norace + package strategies import ( diff --git a/internal/strategies/gradual_rollout_random_test.go b/internal/strategies/gradual_rollout_random_test.go index 7160e95..a0e9790 100644 --- a/internal/strategies/gradual_rollout_random_test.go +++ b/internal/strategies/gradual_rollout_random_test.go @@ -1,3 +1,5 @@ +// +build norace + package strategies import ( diff --git a/internal/strategies/gradual_rollout_session_id_test.go b/internal/strategies/gradual_rollout_session_id_test.go index 442e917..0d9ef0c 100644 --- a/internal/strategies/gradual_rollout_session_id_test.go +++ b/internal/strategies/gradual_rollout_session_id_test.go @@ -1,3 +1,5 @@ +// +build norace + package strategies import ( diff --git a/internal/strategies/gradual_rollout_user_id_test.go b/internal/strategies/gradual_rollout_user_id_test.go index c010b21..d14d58e 100644 --- a/internal/strategies/gradual_rollout_user_id_test.go +++ b/internal/strategies/gradual_rollout_user_id_test.go @@ -1,3 +1,5 @@ +// +build norace + package strategies import ( diff --git a/spec_test.go b/spec_test.go index 9f34617..3355c77 100644 --- a/spec_test.go +++ b/spec_test.go @@ -1,3 +1,5 @@ +// +build norace + package unleash import (