circle-test.sh 619 B

123456789101112131415161718192021222324252627282930
  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 --pure-lockfile
  16. exit_if_fail npm test
  17. #test -z "$(gofmt -s -l ./pkg/... | tee /dev/stderr)"
  18. exit_if_fail test -z "$(gofmt -s -l ./pkg/... | tee /dev/stderr)"
  19. #exit_if_fail go run build.go setup
  20. exit_if_fail go run build.go build
  21. exit_if_fail go vet ./pkg/...
  22. exit_if_fail go test -v ./pkg/...