Enable codecov.io
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
This commit is contained in:
parent
3c44ec5dbc
commit
19ca156c91
2 changed files with 15 additions and 3 deletions
|
@ -23,3 +23,6 @@ script:
|
|||
- make binaries
|
||||
- make coverage
|
||||
- sudo PATH=$PATH GOPATH=$GOPATH make root-coverage
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
|
15
Makefile
15
Makefile
|
@ -128,9 +128,18 @@ uninstall:
|
|||
|
||||
coverage: ## generate coverprofiles from the unit tests, except tests that require root
|
||||
@echo "🐳 $@"
|
||||
@( for pkg in $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}); do \
|
||||
go test -i ${TESTFLAGS} -test.short -coverprofile="../../../$$pkg/coverage.txt" -covermode=atomic $$pkg || exit; \
|
||||
go test ${TESTFLAGS} -test.short -coverprofile="../../../$$pkg/coverage.txt" -covermode=atomic $$pkg || exit; \
|
||||
@rm -f coverage.txt
|
||||
( for pkg in $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}); do \
|
||||
go test -i ${TESTFLAGS} -test.short -coverprofile=coverage.out -covermode=atomic $$pkg || exit; \
|
||||
if [ -f profile.out ]; then \
|
||||
cat profile.out >> coverage.txt; \
|
||||
rm profile.out; \
|
||||
fi; \
|
||||
go test ${TESTFLAGS} -test.short -coverprofile=coverage.out -covermode=atomic $$pkg || exit; \
|
||||
if [ -f profile.out ]; then \
|
||||
cat profile.out >> coverage.txt; \
|
||||
rm profile.out; \
|
||||
fi; \
|
||||
done )
|
||||
|
||||
root-coverage: ## generae coverage profiles for the unit tests
|
||||
|
|
Loading…
Reference in a new issue