Add test-coverage & codecov target and update circleci
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
committed by
Daniel Nephin
parent
883d28cfce
commit
d79d903864
13
Makefile
13
Makefile
@ -14,6 +14,19 @@ clean:
|
||||
test:
|
||||
go test -tags daemon -v $(shell go list ./... | grep -v /vendor/)
|
||||
|
||||
.PHONY: test-coverage
|
||||
test-coverage:
|
||||
for pkg in $(shell go list ./... | grep -v /vendor/); do \
|
||||
go test -tags daemon -v -cover -parallel 8 -coverprofile=profile.out -covermode=atomic $${pkg} || exit 1; \
|
||||
if test -f profile.out; then \
|
||||
cat profile.out >> coverage.txt && rm profile.out; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
.PHONY: codecov
|
||||
codecov:
|
||||
$(shell curl -s https://codecov.io/bash | bash)
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
gometalinter --config gometalinter.json ./...
|
||||
|
||||
Reference in New Issue
Block a user