diff --git a/Makefile b/Makefile index 5e4534d0..59acea4d 100644 --- a/Makefile +++ b/Makefile @@ -31,12 +31,6 @@ clean: test: ./test.sh - ./test/test-gofmt.sh - ./test/test-yamlfmt.sh - go test - #go test ./pgraph - go test -race - #go test -race ./pgraph format: find -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -exec gofmt -w {} \; diff --git a/test.sh b/test.sh index 4d90f302..775c1a28 100755 --- a/test.sh +++ b/test.sh @@ -9,3 +9,14 @@ git diff-tree --check $(git hash-object -t tree /dev/null) HEAD # ensure entries to authors file are sorted start=$(($(grep -n '^[[:space:]]*$' AUTHORS | awk -F ':' '{print $1}' | head -1) + 1)) diff <(tail -n +$start AUTHORS | sort) <(tail -n +$start AUTHORS) + +./test/test-gofmt.sh +./test/test-yamlfmt.sh +go test +#go test ./pgraph + +# do these longer tests only when running on ci +if env | grep -q '^TRAVIS=true$'; then + go test -race + #go test -race ./pgraph +fi