Skip to content

Commit

Permalink
Merge branch 'travis'
Browse files Browse the repository at this point in the history
Only run infection if xdebug is available
  • Loading branch information
jasny committed Sep 3, 2019
2 parents e200ac3 + f2dc39c commit 4fcc506
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ before_install:
install:
- composer install --prefer-source $COMPOSER_FLAGS
- wget https://scrutinizer-ci.com/ocular.phar -O "$HOME/ocular.phar"


before_script:
- test "$TRAVIS_ALLOW_FAILURE" == "true" || export PHPUNIT_FLAGS="--coverage-clover cache/logs/clover.xml"
- export HAS_XDEBUG=$(php -m | grep -i xdebug)

script:
- vendor/bin/phpunit --coverage-clover cache/logs/clover.xml
- vendor/bin/infection --only-covered --no-progress --no-interaction --threads=4
- vendor/bin/phpunit $PHPUNIT_FLAGS
- test -z "$HAS_XDEBUG" || vendor/bin/infection --only-covered --no-progress --no-interaction --threads=4

after_success:
- php "$HOME/ocular.phar" code-coverage:upload --format=php-clover cache/logs/clover.xml
after_script:
- test "$TRAVIS_ALLOW_FAILURE" == "true" || php "$HOME/ocular.phar" code-coverage:upload --format=php-clover cache/logs/clover.xml

0 comments on commit 4fcc506

Please sign in to comment.