Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: separate specification tests from race conditions tests #154

Merged
merged 5 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading