Skip to content

Commit

Permalink
test: separate specification tests from race conditions tests (#154) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Nov 23, 2023
1 parent 95ac006 commit 6e71cb0
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ test: check
go test ./...

test-race: check
go test -race ./...
go test -race ./... -tags='!norace'
2 changes: 2 additions & 0 deletions internal/strategies/flexible_rollout_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build norace

package strategies

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/strategies/gradual_rollout_random_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build norace

package strategies

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/strategies/gradual_rollout_session_id_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build norace

package strategies

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/strategies/gradual_rollout_user_id_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build norace

package strategies

import (
Expand Down
2 changes: 2 additions & 0 deletions spec_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build norace

package unleash

import (
Expand Down

0 comments on commit 6e71cb0

Please sign in to comment.