diff --git a/.scrutinizer.yml b/.scrutinizer.yml index a211422..9cef7f5 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -20,7 +20,7 @@ build: tools: external_code_coverage: - timeout: 600 + timeout: 900 build_failure_conditions: - 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed diff --git a/.travis.yml b/.travis.yml index d27fa09..6065add 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,10 @@ php: env: matrix: - - EXECUTOR=coroutine + - EXECUTOR= DEPENDENCIES=--prefer-lowest + - EXECUTOR=coroutine DEPENDENCIES=--prefer-lowest - EXECUTOR= + - EXECUTOR=coroutine cache: @@ -31,9 +33,8 @@ jobs: include: - stage: Test - env: DEPENDENCIES=low install: - - travis_retry composer update --prefer-dist --prefer-lowest + - travis_retry composer update --prefer-dist {$DEPENDENCIES} - stage: Test env: COVERAGE @@ -41,10 +42,12 @@ jobs: - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} - if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi script: - - ./vendor/bin/phpunit --coverage-clover clover.xml + - ./vendor/bin/phpunit --coverage-php /tmp/coverage/clover_executor.cov + - EXECUTOR=coroutine ./vendor/bin/phpunit --coverage-php /tmp/coverage/clover_executor-coroutine.cov after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover clover.xml + - ./vendor/bin/phpcov merge /tmp/coverage --clover /tmp/clover.xml + - wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover /tmp/clover.xml - stage: Code Quality php: 7.1 @@ -58,3 +61,4 @@ jobs: env: STATIC_ANALYSIS install: travis_retry composer install --prefer-dist script: composer static-analysis + diff --git a/composer.json b/composer.json index 188e435..34f9d61 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ "phpstan/phpstan": "0.10.5", "phpstan/phpstan-phpunit": "0.10.0", "phpstan/phpstan-strict-rules": "0.10.1", + "phpunit/phpcov": "^5.0", "phpunit/phpunit": "^7.2", "psr/http-message": "^1.0", "react/promise": "2.*"