diff --git a/docker-compose-test.yml b/docker-compose-test.yml new file mode 100644 index 0000000..5270e4f --- /dev/null +++ b/docker-compose-test.yml @@ -0,0 +1,11 @@ +version: '3' + +services: + rove-server: + build: + context: . + dockerfile: cmd/rove-server/Dockerfile + image: rove-server:latest + ports: + - "80:80" + command: ./rove-server --port 80 diff --git a/script/test.sh b/script/test.sh index e3547eb..405b5f4 100755 --- a/script/test.sh +++ b/script/test.sh @@ -4,8 +4,11 @@ cd "$(dirname "$0")" cd .. set -x +# Check that the cmdline client builds +docker build -f "cmd/rove/Dockerfile" . + # Build and start rove-server -docker-compose up --detach --build +docker-compose -f docker-compose-test.yml up --detach --build # Run tests, including integration tests go mod download @@ -14,8 +17,5 @@ go test -v ./... -tags integration -cover -coverprofile=/tmp/c.out # Take down the service docker-compose down -# Check that the cmdline client builds -docker build -f "cmd/rove/Dockerfile" . - # Convert the coverage data to html go tool cover -html=/tmp/c.out -o /tmp/coverage.html \ No newline at end of file