2020-05-31 11:40:07 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
cd ..
|
|
|
|
set -x
|
|
|
|
|
2020-06-05 23:17:04 +01:00
|
|
|
# Check that the cmdline client builds
|
|
|
|
docker build -f "cmd/rove/Dockerfile" .
|
|
|
|
|
2020-06-05 21:45:21 +01:00
|
|
|
# Build and start rove-server
|
2020-06-05 23:17:04 +01:00
|
|
|
docker-compose -f docker-compose-test.yml up --detach --build
|
2020-05-31 19:48:43 +01:00
|
|
|
|
|
|
|
# Run tests, including integration tests
|
2020-06-01 17:49:30 +01:00
|
|
|
go mod download
|
2020-05-31 11:55:46 +01:00
|
|
|
go test -v ./... -tags integration -cover -coverprofile=/tmp/c.out
|
2020-05-31 19:48:43 +01:00
|
|
|
|
|
|
|
# Take down the service
|
2020-05-31 11:55:46 +01:00
|
|
|
docker-compose down
|
|
|
|
|
|
|
|
# Convert the coverage data to html
|
|
|
|
go tool cover -html=/tmp/c.out -o /tmp/coverage.html
|