Fix makefile and coverage output
This commit is contained in:
parent
223c50228e
commit
1cafd4f2ce
2 changed files with 7 additions and 6 deletions
9
Makefile
9
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
|
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
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue