rename gofmt to travis_checker.sh and add testing checker

pull/242/head
Minh Doan 6 years ago committed by Minh Doan
parent 2db1853101
commit d95a2dc60d
  1. 4
      .travis.yml
  2. 5
      scripts/travis_checker.sh
  3. 2
      test/test_before_submit.sh

@ -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

@ -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 .

@ -6,7 +6,7 @@ OS=$(uname -s)
go test ./...
pushd $DIRROOT
./.travis.gofmt.sh
./scripts/.travis_checker.sh
case $OS in
Darwin)

Loading…
Cancel
Save