Disable xdebug to speed up tests
Run code coverage separately and only activate xdebug for that specific job to speed up other jobs
This commit is contained in:
parent
ae1b85f961
commit
f2838c0153
23
.travis.yml
23
.travis.yml
|
@ -8,6 +8,9 @@ php:
|
||||||
- hhvm
|
- hhvm
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
include:
|
||||||
|
- php: 7.0
|
||||||
|
env: COVERAGE=1
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: 7.1
|
- php: 7.1
|
||||||
- php: hhvm
|
- php: hhvm
|
||||||
|
@ -18,19 +21,17 @@ cache:
|
||||||
- $HOME/.composer/cache
|
- $HOME/.composer/cache
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
## Packages
|
# Deactivate xdebug if we don't do code coverage
|
||||||
- sudo apt-get -qq update > /dev/null
|
- if [ -z "$COVERAGE" ]; then rm -rfv /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ; fi
|
||||||
## Composer
|
|
||||||
- composer self-update
|
|
||||||
- composer install
|
- composer install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
## PHP_CodeSniffer
|
# PHP_CodeSniffer
|
||||||
- ./vendor/bin/phpcs --report-width=200 --report-summary --report-full samples/ src/ tests/ --standard=PSR2 -n
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpcs --report-width=200 --report-summary --report-full samples/ src/ tests/ --standard=PSR2 -n ; fi
|
||||||
## PHP-CS-Fixer
|
# PHP-CS-Fixer
|
||||||
- ./vendor/bin/php-cs-fixer fix --diff --verbose
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/php-cs-fixer fix --diff --verbose ; fi
|
||||||
## PHPUnit
|
# PHPUnit
|
||||||
- ./vendor/bin/phpunit --coverage-clover coverage-clover.xml
|
- ./vendor/bin/phpunit $(if [ -n "$COVERAGE" ]; then echo --debug --coverage-clover coverage-clover.xml ; fi)
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- if [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml ; fi
|
- if [ -n "$COVERAGE" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml ; fi
|
||||||
|
|
Loading…
Reference in New Issue