[BUGFIX] circleci for coveralls.io

This commit is contained in:
Martin Geno 2017-06-13 01:34:08 +02:00
parent 524092e650
commit f90ad1cf86
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
1 changed files with 5 additions and 1 deletions

View File

@ -4,11 +4,15 @@
CI=$1
echo "run for $CI"
if [ "$CI" == "circle-ci" ]; then
cd ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
fi
echo "mode: count" > profile.cov
FAIL=0
# Standard go tooling behavior is to ignore dirs with leading underscors
for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d);
for dir in $(find . -maxdepth 10 -not -path './vendor/*' -not -path './.git*' -not -path '*/_*' -type d);
do
if ls $dir/*.go &> /dev/null; then
go test -v -covermode=count -coverprofile=profile.tmp $dir || FAIL=$?