Skip to content

Commit

Permalink
test: separate specification tests from race conditions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Nov 22, 2023
1 parent ccb494a commit 8ba4c33
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
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 ./... -tags='!spec'
go test -race ./... -tags='!norace'
1 change: 1 addition & 0 deletions internal/strategies/gradual_rollout_random_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// +build norace

Check failure on line 1 in internal/strategies/gradual_rollout_random_test.go

View workflow job for this annotation

GitHub Actions / build (1.13)

+build comment must appear before package clause and be followed by a blank line

Check failure on line 1 in internal/strategies/gradual_rollout_random_test.go

View workflow job for this annotation

GitHub Actions / build (1.15)

+build comment must appear before package clause and be followed by a blank line

Check failure on line 1 in internal/strategies/gradual_rollout_random_test.go

View workflow job for this annotation

GitHub Actions / build (1.16)

+build comment must appear before package clause and be followed by a blank line
package strategies

import (
Expand Down
2 changes: 1 addition & 1 deletion spec_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build spec
// +build norace

package unleash

Expand Down

0 comments on commit 8ba4c33

Please sign in to comment.