Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | default: services test |
| 2 | |
| 3 | .PHONY: test |
| 4 | test: |
| 5 | go test ./... |
| 6 | |
| 7 | .PHONY: cover |
| 8 | cover: |
| 9 | go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs -L 1 sh -c |
| 10 | |
| 11 | .PHONY: publish_cover |
| 12 | publish_cover: cover |
| 13 | go get -d golang.org/x/tools/cmd/cover |
| 14 | go get github.com/modocache/gover |
| 15 | go get github.com/mattn/goveralls |
| 16 | gover |
| 17 | @goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken=$(COVERALLS_TOKEN) |
| 18 | |
| 19 | .PHONY: clean |
| 20 | clean: |
| 21 | @find . -name \.coverprofile -type f -delete |
| 22 | @rm -f gover.coverprofile |