Skip to content

Commit

Permalink
chore: add -race flag to go tests (#10629)
Browse files Browse the repository at this point in the history
  • Loading branch information
sspaink authored Feb 11, 2022
1 parent 5511387 commit 6b18602
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,17 @@ commands:
- restore_cache:
key: windows-go-<< parameters.cache_version >>-{{ checksum "go.sum" }}
- run: 'sh ./scripts/installgo_windows.sh'
- run: choco install mingw
- run: mkdir -p test-results
- run: ./scripts/install_gotestsum.sh << parameters.os >> << parameters.gotestsum >>
- unless:
condition:
equal: [ "386", << parameters.arch >> ]
steps:
- run: echo 'export RACE="-race"' >> $BASH_ENV
- run: |
PACKAGE_NAMES=$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> --junitfile test-results/gotestsum-report.xml -- -short $PACKAGE_NAMES
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> --junitfile test-results/gotestsum-report.xml -- ${RACE} -short $PACKAGE_NAMES
- store_test_results:
path: test-results
- when:
Expand Down

0 comments on commit 6b18602

Please sign in to comment.