circle-test.sh 633 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. function exit_if_fail {
  3. command=$@
  4. echo "Executing '$command'"
  5. eval $command
  6. rc=$?
  7. if [ $rc -ne 0 ]; then
  8. echo "'$command' returned $rc."
  9. exit $rc
  10. fi
  11. }
  12. cd /home/ubuntu/.go_workspace/src/github.com/grafana/grafana
  13. rm -rf node_modules
  14. npm install -g yarn
  15. yarn install
  16. exit_if_fail npm test
  17. exit_if_fail npm run coveralls
  18. #test -z "$(gofmt -s -l ./pkg/... | tee /dev/stderr)"
  19. exit_if_fail test -z "$(gofmt -s -l ./pkg/... | tee /dev/stderr)"
  20. exit_if_fail go run build.go setup
  21. exit_if_fail go run build.go build
  22. exit_if_fail go vet ./pkg/...
  23. exit_if_fail go test -v ./pkg/...