diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a05d9b..7f6a3bf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,8 +36,8 @@ commands: set -x if [[ $OS == Windows_NT ]]; then curl https://dl.google.com/go/go<< parameters.version >>.windows-amd64.zip -o /tmp/go.zip - mv /c/go /c/go-112 - unzip -q /tmp/go.zip -d /c/ + mv '/c/Program Files/Go' '/c/Program Files/Go.bak' + unzip -q /tmp/go.zip -d '/c/Program Files' else curl https://dl.google.com/go/go<< parameters.version >>.$(uname -s | tr A-Z a-z)-amd64.tar.gz -o /tmp/go.tar.gz tar -C /tmp -xzf /tmp/go.tar.gz @@ -64,6 +64,7 @@ jobs: resource_class: small steps: - checkout + - run: make test-race - run: make test - save-coverage @@ -73,6 +74,7 @@ jobs: steps: - install-go - checkout + - run: make test-race - run: make test - save-coverage @@ -83,7 +85,7 @@ jobs: steps: - install-go - checkout - - run: "eval $(grep 'go test' Makefile)" + - run: "eval $(grep 'GOCOVERDIR=. go test ' Makefile)" - save-coverage "test": diff --git a/Makefile b/Makefile index 6c1e535..8369d0e 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,13 @@ SHELL = bash dlib.cov: test test -e $@ touch $@ + +test-race: + go test -count=1 -race ./... +.PHONY: test + test: - GOCOVERDIR=. go test -count=1 -coverprofile=dlib.cov -coverpkg=./... -race ./... + GOCOVERDIR=. go test -count=1 -coverprofile=dlib.cov -coverpkg=./... ./... .PHONY: test %.cov.html: %.cov