Merge pull request #1651 from taosdata/add-test-coverage-support

Add branch coverage support and email-to-author notification.
This commit is contained in:
slguan 2020-04-18 21:51:43 +08:00 committed by GitHub
commit 29b2e95ddb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

12
.codecov.yml Normal file
View File

@ -0,0 +1,12 @@
coverage:
precision: 2
notify:
email:
default:
to:
- sdsang@taosdata.com
- &author
only_pulls: false
layout: reach, diff, flags, files
flags: null
paths: null

View File

@ -146,8 +146,8 @@ matrix:
fi
cd ${TRAVIS_BUILD_DIR}
lcov -d . --capture -o coverage.info
lcov -l coverage.info || exit $?
lcov -d . --capture --rc lcov_branch_coverage=1 -o coverage.info
lcov -l --rc lcov_branch_coverage=1 coverage.info || exit $?
gem install coveralls-lcov
@ -166,7 +166,7 @@ matrix:
exit $?
fi
bash <(curl -s https://codecov.io/bash) -f coverage.info
bash <(curl -s https://codecov.io/bash) -y .codecov.yml -f coverage.info
if [ "$?" -eq "0" ]; then
echo -e "${GREEN} ## Uploaded to Codecov! ## ${NC} "
else