diff --git a/Makefile b/Makefile index 5c56b8e..ac8fd5e 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,8 @@ gen: protoc --proto_path pkg/accounts --go_out=plugins=grpc:pkg/accounts/ --go_opt=paths=source_relative pkg/accounts/accounts.proto test: - docker-compose up --build --exit-code-from=rove-tests --abort-on-container-exit + docker-compose up --build --exit-code-from=rove-tests --abort-on-container-exit rove-tests + go tool cover -html=/tmp/coverage-data/c.out -o /tmp/coverage.html + @echo Done, coverage data can be found in /tmp/coverage.html - # TODO: Collect and convert the coverage data to html - # go tool cover -html=/tmp/c.out -o /tmp/coverage.html - -.PHONY: install test +.PHONY: build install test gen diff --git a/docker-compose.yml b/docker-compose.yml index f99139a..9eab597 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,9 @@ services: environment: - ACCOUNTANT_ADDRESS=rove-accountant:8081 - ROVE_SERVER_ADDRESS=rove-server:80 - command: [ "go", "test", "-v", "./...", "--tags=integration", "-cover", "-coverprofile=/tmp/c.out", "-count", "1" ] + command: [ "go", "test", "-v", "./...", "--tags=integration", "-cover", "-coverprofile=/mnt/coverage-data/c.out", "-count", "1" ] + volumes: + - /tmp/coverage-data:/mnt/coverage-data:rw