circle-test-backend.sh 447 B

1234567891011121314151617181920
  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. echo "building backend with install to cache pkgs"
  13. exit_if_fail time go install ./pkg/cmd/grafana-server
  14. echo "running go test"
  15. set -e
  16. time for d in $(go list ./pkg/...); do
  17. exit_if_fail go test -tags=integration -covermode=atomic $d
  18. done