aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.circleci/config.yml9
-rw-r--r--GNUmakefile8
2 files changed, 16 insertions, 1 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 818aa2c..d062230 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -35,5 +35,12 @@ jobs:
- run: make dep
- run: make lint
- run: make vet
- - run: make test
+ - run:
+ name: Unit Test
+ command: |
+ if [ "${CIRCLE_BRANCH}" == "master" ]; then
+ make test
+ else
+ make test-short
+ fi
- run: make
diff --git a/GNUmakefile b/GNUmakefile
index dd4a857..e1fc38a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -68,6 +68,14 @@ lint:
vet:
@go vet `go list ./... | grep -v 'vendor'`
+test-short:
+ @for pkg in `go list ./... | grep -v 'vendor'`; do \
+ if ! go test -race -short $$pkg; then \
+ echo 'Some test failed, abort'; \
+ exit 1; \
+ fi; \
+ done
+
test:
@for pkg in `go list ./... | grep -v 'vendor'`; do \
if ! go test -race $$pkg; then \