|
|
@@ -1,7 +1,15 @@
|
|
|
default: fmt vet errcheck test
|
|
|
|
|
|
+# Taken from https://github.com/codecov/example-go#caveat-multiple-files
|
|
|
test:
|
|
|
- go test -v -timeout 60s -race ./...
|
|
|
+ echo "" > coverage.txt
|
|
|
+ for d in `go list ./... | grep -v vendor`; do \
|
|
|
+ go test -v -timeout 60s -race -coverprofile=profile.out -covermode=atomic $$d; \
|
|
|
+ if [ -f profile.out ]; then \
|
|
|
+ cat profile.out >> coverage.txt; \
|
|
|
+ rm profile.out; \
|
|
|
+ fi \
|
|
|
+ done
|
|
|
|
|
|
vet:
|
|
|
go vet ./...
|