Add race testing
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
- build:
+ test:
docker:
# specify the version
- image: circleci/golang:1.13
@@ -25,3 +25,35 @@ jobs:
# specify any bash command here prefixed with `run: `
- run: go get -v -t -d ./...
- run: go test -v ./...
+
+ race:
+ docker:
+ # specify the version
+ - image: circleci/golang:1.13
+
+ # Specify service dependencies here if necessary
+ # CircleCI maintains a library of pre-built images
+ # documented at https://circleci.com/docs/2.0/circleci-images/
+ # - image: circleci/postgres:9.4
+
+ #### TEMPLATE_NOTE: go expects specific checkout path representing url
+ #### expecting it in the form of
+ #### /go/src/github.com/circleci/go-tool
+ #### /go/src/bitbucket.org/circleci/go-tool
+ working_directory: /go/src/github.com/rqlite/rqlite
+ steps:
+ - checkout
+
+ # specify any bash command here prefixed with `run: `
+ - run: go get -v -t -d ./...
+ - run:
+ command: go test -race -v ./...
+ environment:
+ GORACE: "halt_on_error=1"
+
+workflows:
+ version: 2
+ build_and_test:
+ jobs:
+ - test
+ - race
