Coverage with PCOV instead of xdebug

Because it is much, much faster than xdebug
This commit is contained in:
Adrien Crivelli 2019-12-19 11:03:04 +01:00
parent 4b6ad77690
commit a163d9d1ab
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
1 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,7 @@ cache:
before_script: before_script:
# Deactivate xdebug # Deactivate xdebug
- if [ -z "$KEEP_XDEBUG" ]; then rm -rfv /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ; fi - phpenv config-rm xdebug.ini
- composer install --ignore-platform-reqs - composer install --ignore-platform-reqs
script: script:
@ -32,9 +32,11 @@ jobs:
- stage: Coverage - stage: Coverage
php: 7.2 php: 7.2
env: KEEP_XDEBUG=1
script: script:
- travis_wait 40 ./vendor/bin/phpunit --debug --coverage-clover coverage-clover.xml - pecl install pcov
- composer require pcov/clobber --dev
- ./vendor/bin/pcov clobber
- ./vendor/bin/phpunit --coverage-clover coverage-clover.xml
after_script: after_script:
- wget https://scrutinizer-ci.com/ocular.phar - wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml - php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml