diff --git a/circle.yml b/circle.yml index 4f73ec8..98ccc3e 100644 --- a/circle.yml +++ b/circle.yml @@ -21,6 +21,7 @@ test: pre: - go get -u github.com/jstemmer/go-junit-report - go get -u github.com/mattn/goveralls + - cd $PROJECT_PATH && wget https://raw.githubusercontent.com/Financial-Times/cookiecutter-upp-golang/master/coverage.sh && chmod +x coverage.sh override: - mkdir -p $CIRCLE_TEST_REPORTS/golang - cd $PROJECT_PATH && govendor test -race -v +local | go-junit-report > $CIRCLE_TEST_REPORTS/golang/junit.xml diff --git a/coverage.sh b/coverage.sh deleted file mode 100755 index 6c6d8da..0000000 --- a/coverage.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -echo "mode: atomic" > $CIRCLE_ARTIFACTS/coverage.out # covermode is set to atomic when running tests using the -race flag - -PACKAGES=`govendor list -no-status +local` -PACKAGES_LIST=`govendor list -no-status +local | paste -sd ',' -` -EXIT_CODE=0 - -for PKG in $PACKAGES; do - echo =-= $PKG - - govendor test -v -race -coverpkg=$PACKAGES_LIST -coverprofile=$CIRCLE_ARTIFACTS/profile.out $PKG; __EXIT_CODE__=$? - - if [ "$__EXIT_CODE__" -ne "0" ]; then - EXIT_CODE=$__EXIT_CODE__ - fi - - if [ -f $CIRCLE_ARTIFACTS/profile.out ]; then - tail -n +2 $CIRCLE_ARTIFACTS/profile.out >> $CIRCLE_ARTIFACTS/coverage.out; rm $CIRCLE_ARTIFACTS/profile.out - fi -done - -exit $EXIT_CODE \ No newline at end of file