From f90ad1cf86de015e485080092d7e34e80f9d0dc1 Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Tue, 13 Jun 2017 01:34:08 +0200 Subject: [PATCH] [BUGFIX] circleci for coveralls.io --- .test-coverage | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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=$?