Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessio Caiazza <acaiazza@gitlab.com>2020-02-26 12:26:09 +0300
committerAlessio Caiazza <acaiazza@gitlab.com>2020-02-26 12:40:31 +0300
commit62843f421f3741dc20133fab22634364d8816be5 (patch)
tree8c7e82d41b7bcfa48989a9e63ea0c0faf5f411d3
parent6f4fcff22c468de4102d908455d5c01aa27b8760 (diff)
Run go test -race in CI
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--Makefile.util.mk3
2 files changed, 11 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5631d943..fe193eb6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -75,6 +75,14 @@ test:1.13:
extends: .tests
image: golang:1.13
+race:
+ extends: .go-mod-cache
+ stage: test
+ needs: ['download deps']
+ script:
+ - echo "Running race detector"
+ - make race
+
check deps:
extends: .go-mod-cache
stage: test
diff --git a/Makefile.util.mk b/Makefile.util.mk
index 80ca63b1..412b7655 100644
--- a/Makefile.util.mk
+++ b/Makefile.util.mk
@@ -17,6 +17,9 @@ complexity: .GOPATH/.ok bin/gocyclo
test: .GOPATH/.ok gitlab-pages
go test $(if $V,-v) $(allpackages)
+race: .GOPATH/.ok gitlab-pages
+ CGO_ENABLED=1 go test -race $(if $V,-v) $(allpackages)
+
acceptance: .GOPATH/.ok gitlab-pages
go test $(if $V,-v) $(IMPORT_PATH)