rove/script/test.sh

22 lines
425 B
Bash
Raw Normal View History

2020-05-31 11:40:07 +01:00
#!/bin/bash
set -e
cd "$(dirname "$0")"
cd ..
set -x
# Test the build
go build -v .
2020-05-31 11:40:07 +01:00
# Run unit tests
go test -v ./... -cover
# Verify docker build
docker build .
# Run the integration tests with docker-compose
docker-compose up --build --detach
2020-05-31 11:55:46 +01:00
go test -v ./... -tags integration -cover -coverprofile=/tmp/c.out
docker-compose down
# Convert the coverage data to html
go tool cover -html=/tmp/c.out -o /tmp/coverage.html