script.sh 847 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env bash
  2. set -ex
  3. go get -t ./...
  4. if [ ${TESTMODE} == "lint" ]; then
  5. curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.15.0
  6. ./bin/golangci-lint run ./...
  7. fi
  8. if [ ${TESTMODE} == "unit" ]; then
  9. ginkgo -r -v -cover -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests,benchmark
  10. fi
  11. if [ ${TESTMODE} == "integration" ]; then
  12. # run benchmark tests
  13. ginkgo -randomizeAllSpecs -randomizeSuites -trace benchmark -- -samples=1
  14. # run benchmark tests with the Go race detector
  15. # The Go race detector only works on amd64.
  16. if [ ${TRAVIS_GOARCH} == 'amd64' ]; then
  17. ginkgo -race -randomizeAllSpecs -randomizeSuites -trace benchmark -- -samples=1 -size=10
  18. fi
  19. # run integration tests
  20. ginkgo -r -v -randomizeAllSpecs -randomizeSuites -trace integrationtests
  21. fi