diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 802b75a..a441879 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 566a96d..75f59b1 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 16ca57e..036e3b8 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 b402872..c2def5c 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 ac8cadf..d5327e3 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 4260fab..a2a19ce 100644 --- a/spec_test.go +++ b/spec_test.go @@ -1,3 +1,5 @@ +// +build norace + package unleash import (