From ae975c48ac39b9c12248278489cebf9b126bc53a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 6 Aug 2019 19:35:23 +0200 Subject: [PATCH] Avoid sending empty reports to codecov (#12293) Before this commit we were sending reports also for unit tests that were not collecting coverage data. --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3151981adcf..c94f3e748c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -200,9 +200,11 @@ after_success: - ccache -s - case "$TEST_SUITE" in unit) - codecov --env PYTHON_VERSION - --required - --flags "${TEST_SUITE}${TRAVIS_OS_NAME}"; + if [[ "$COVERAGE" == "true" ]]; then + codecov --env PYTHON_VERSION + --required + --flags "${TEST_SUITE}${TRAVIS_OS_NAME}"; + fi ;; esac