rove/script/test.sh

18 lines
460 B
Bash
Raw Normal View History

2020-05-31 11:40:07 +01:00
#!/bin/bash
set -e
cd "$(dirname "$0")"
cd ..
set -x
# Check we can build everything
go mod download
go build ./...
# Run the server and shut it down again to ensure our docker-compose works
ROVE_ARGS="--quit 1" docker-compose up --build --exit-code-from=rove-server --abort-on-container-exit
2020-05-31 11:55:46 +01:00
# Run tests with coverage
go test -v ./... -cover -coverprofile=/tmp/c.out
2020-05-31 11:55:46 +01:00
# Convert the coverage data to html
go tool cover -html=/tmp/c.out -o /tmp/coverage.html