diff --git a/.test-coverage b/.test-coverage index 06fa03d..cd46eda 100755 --- a/.test-coverage +++ b/.test-coverage @@ -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=$?