From 6135d25146b80f27e518efe2b166544fd12e8630 Mon Sep 17 00:00:00 2001 From: brantje Date: Fri, 6 Jan 2017 12:29:29 +0100 Subject: [PATCH] Fix failing tests if token is not set --- .scrutinizer.yml | 2 +- .travis.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 048faab3..15d5e847 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -12,7 +12,7 @@ imports: tools: external_code_coverage: true external_code_coverage: - timeout: 7200 # Timeout in seconds: 2 hours + timeout: 600 # Timeout in seconds: 10 min php_mess_detector: true php_code_sniffer: true sensiolabs_security_checker: true diff --git a/.travis.yml b/.travis.yml index e6f06c97..2a93ffde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,8 +66,10 @@ script: # Create coverage report - - sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then php vendor/bin/codacycoverage -v clover coverage.clover; fi" - - sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then php ocular.phar code-coverage:upload --access-token="$SCRUTINIZER_TOKEN" --format=php-clover coverage.clover; fi" + - sh -c "if [ -z "${CODACY_PROJECT_TOKEN+xxx}" ]; then echo 'Codacy token is not set'; fi" + - sh -c "if [ -z "${CODACY_PROJECT_TOKEN}" -a '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then php vendor/bin/codacycoverage -v clover coverage.clover; fi" + - sh -c "if [ -z "${SCRUTINIZER_TOKEN+xxx}" ]; then echo 'Scrutinizer token is not set'; fi" + - sh -c "if [ -z "${SCRUTINIZER_TOKEN}" -a '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then php ocular.phar code-coverage:upload --access-token="$SCRUTINIZER_TOKEN" --format=php-clover coverage.clover; fi" - sh -c "if [ '$JSTESTS' = '1' ]; then grunt jshint; fi"