You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
431 B

  1. #!/usr/bin/env bash
  2. set -e
  3. echo "" > coverage.txt
  4. echo "==> Running unit tests"
  5. for d in $(go list ./... | grep -v vendor); do
  6. go test -race -coverprofile=profile.out -covermode=atomic "$d"
  7. if [ -f profile.out ]; then
  8. cat profile.out >> coverage.txt
  9. rm profile.out
  10. fi
  11. done
  12. echo "==> Running integration tests (./tests)"
  13. find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
  14. make install
  15. bash tests/test.sh