Skip to content

Commit 487a1fa

Browse files
committed
test for race conditions in CI
1 parent 7a21f4c commit 487a1fa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.circleci/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ commands:
1515
type: string
1616
platform:
1717
type: string
18+
govet:
19+
type: string
20+
default: ""
1821
steps:
1922
- run:
2023
name: "Run go tests"
2124
command: |
2225
PACKAGE_NAMES=$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)
2326
echo "Running $(echo $PACKAGE_NAMES | wc -w) packages"
2427
echo $PACKAGE_NAMES
25-
<< parameters.cmd >> --format=short-verbose --junitfile $TEST_RESULTS_PATH/go-getter/gotestsum-report.xml -- -p 2 -cover -coverprofile=<< parameters.platform >>_cov_$CIRCLE_NODE_INDEX.part $PACKAGE_NAMES
28+
<< parameters.cmd >> --format=short-verbose --junitfile $TEST_RESULTS_PATH/go-getter/gotestsum-report.xml -- -p 2 -cover -race -vet=<< parameters.govet >> -coverprofile=<< parameters.platform >>_cov_$CIRCLE_NODE_INDEX.part $PACKAGE_NAMES
2629
2730
jobs:
2831
linux-tests:
@@ -140,6 +143,9 @@ jobs:
140143
- run-gotests:
141144
cmd: "./gotestsum.exe"
142145
platform: "win"
146+
# Otherwise gcc is required for race detector
147+
# See https://github.com/golang/go/issues/27089
148+
govet: "off"
143149

144150
# Save coverage report parts
145151
- persist_to_workspace:

0 commit comments

Comments
 (0)