summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2020-05-11 13:26:31 -0700
committerStan Hu <stanhu@gmail.com>2020-05-11 13:29:23 -0700
commitad452b146f332ce390c394d76a09803725f99e81 (patch)
tree8918a0c0a8da3fa31acb8491e96e7a3259e41f69
parent940aa912784b2e99d6f2a767f13bd013a62c94f8 (diff)
downloadgitlab-shell-sh-add-race-test.tar.gz
Add race testing as separate CI stepsh-add-race-test
This would help catch race conditions such as https://gitlab.com/gitlab-org/gitlab-shell/-/issues/450 before merge.
-rw-r--r--.gitlab-ci.yml6
-rw-r--r--Makefile3
2 files changed, 9 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e351fd1..c9c1744 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -55,6 +55,12 @@ go:1.14:
extends: .test
image: golang:1.14
+race:
+ extends: .test
+ image: golang:1.14
+ script:
+ - make test_golang_race
+
codequality:
extends: .use-docker-in-docker
allow_failure: true
diff --git a/Makefile b/Makefile
index 4b0ca2c..5c2a8f1 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,9 @@ test_ruby:
test_golang:
go test ./...
+test_golang_race:
+ go test -race ./...
+
setup: _install bin/gitlab-shell
_install: