commit
dd866d6569
2 changed files with 15 additions and 3 deletions
|
@ -23,3 +23,6 @@ script:
|
||||||
- make binaries
|
- make binaries
|
||||||
- make coverage
|
- make coverage
|
||||||
- sudo PATH=$PATH GOPATH=$GOPATH make root-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
|
coverage: ## generate coverprofiles from the unit tests, except tests that require root
|
||||||
@echo "🐳 $@"
|
@echo "🐳 $@"
|
||||||
@( for pkg in $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}); do \
|
@rm -f coverage.txt
|
||||||
go test -i ${TESTFLAGS} -test.short -coverprofile="../../../$$pkg/coverage.txt" -covermode=atomic $$pkg || exit; \
|
( for pkg in $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}); do \
|
||||||
go test ${TESTFLAGS} -test.short -coverprofile="../../../$$pkg/coverage.txt" -covermode=atomic $$pkg || exit; \
|
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 )
|
done )
|
||||||
|
|
||||||
root-coverage: ## generae coverage profiles for the unit tests
|
root-coverage: ## generae coverage profiles for the unit tests
|
||||||
|
|
Loading…
Reference in a new issue