diff --git a/.travis.yml b/.travis.yml index cbc7249ed..bec075124 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,10 @@ install: - go get -t -v ./... - go get -u golang.org/x/lint/golint - go get gopkg.in/check.v1 - - ./scripts/gofmt.sh + - ./scripts/travis_checker.sh - go build -v ./... script: - - ./scripts/gofmt.sh + - ./scripts/travis_checker.sh notifications: slack: harmonyone:gggCd1QQopsQAW8JYgBWiH7M diff --git a/scripts/gofmt.sh b/scripts/travis_checker.sh similarity index 77% rename from scripts/gofmt.sh rename to scripts/travis_checker.sh index 76de99ca0..1e01e9f5c 100755 --- a/scripts/gofmt.sh +++ b/scripts/travis_checker.sh @@ -1,5 +1,10 @@ #!/bin/bash +go test ./... +if [ $? -ne 0 ]; then + echo "Some tests failed" + exit 1 +fi if [ $(golint ./... | wc | awk '{print $1}') -gt 2 ]; then echo "Go code is not formatted:" gofmt -d . diff --git a/test/test_before_submit.sh b/test/test_before_submit.sh index 465e294c4..2eb1fdd74 100755 --- a/test/test_before_submit.sh +++ b/test/test_before_submit.sh @@ -6,7 +6,7 @@ OS=$(uname -s) go test ./... pushd $DIRROOT -./.travis.gofmt.sh +./scripts/.travis_checker.sh case $OS in Darwin)