Fix makefile and coverage output

This commit is contained in:
Marc Di Luzio 2020-06-11 18:55:53 +01:00
parent 223c50228e
commit 1cafd4f2ce
2 changed files with 7 additions and 6 deletions

View file

@ -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 protoc --proto_path pkg/accounts --go_out=plugins=grpc:pkg/accounts/ --go_opt=paths=source_relative pkg/accounts/accounts.proto
test: 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 .PHONY: build install test gen
# go tool cover -html=/tmp/c.out -o /tmp/coverage.html
.PHONY: install test

View file

@ -42,7 +42,9 @@ services:
environment: environment:
- ACCOUNTANT_ADDRESS=rove-accountant:8081 - ACCOUNTANT_ADDRESS=rove-accountant:8081
- ROVE_SERVER_ADDRESS=rove-server:80 - 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