From 4095bb5928744387325a8cc3ec31fe28d86a3e75 Mon Sep 17 00:00:00 2001 From: Chi Cao Minh Date: Tue, 2 Jun 2020 11:01:10 -0700 Subject: [PATCH] Adjust code coverage check Since there is not currently a good way to have fine-grain code coverage check exclusions, lower the coverage thresholds to make the check more lenient for now. Also, display the code coverage report in the Travis CI logs to make it easier to understand how to improve coverage. --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 401af9c99520..9b3c755107c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -175,9 +175,13 @@ jobs: | node_modules/.bin/diff-test-coverage --coverage "**/target/site/jacoco/jacoco.xml" --type jacoco - --line-coverage 65 - --branch-coverage 65 + --line-coverage 50 + --branch-coverage 50 --function-coverage 0 + --log-template "coverage-lines-complete" + --log-template "coverage-files-complete" + --log-template "totals-complete" + --log-template "errors" -- || { printf "\nDiff code coverage check failed. To view coverage report, run 'mvn clean test jacoco:report' and open 'target/site/jacoco/index.html'\n" && false; } fi