language: php dist: trusty env: - global: - TASK_TESTS_COVERAGE=0 matrix: fast_finish: true include: - php: 8.1 - php: 8.0 - php: 7.4 env: RUN_PHPSTAN=1 - php: 7.3 - php: 7.2 # run tests coverage on PHP 7.1 - php: 7.1 env: TASK_TESTS_COVERAGE=1 - php: 7.0 - php: 5.6 - php: 5.5 - php: 5.4 #- php: hhvm - php: hhvm-3.21 install: - | if [[ $TASK_TESTS_COVERAGE != 1 ]]; then # disable xdebug for performance reasons when code coverage is not needed. note: xdebug on hhvm is disabled by default phpenv config-rm xdebug.ini || echo "xdebug is not installed" fi - travis_retry composer self-update - export PATH="$HOME/.composer/vendor/bin:$PATH" - travis_retry composer install $DEFAULT_COMPOSER_FLAGS - | if [ $TASK_TESTS_COVERAGE == 1 ]; then PHPUNIT_FLAGS="--coverage-clover=coverage.clover" fi script: - vendor/bin/phpunit $PHPUNIT_FLAGS - | if [ $RUN_PHPSTAN == 1 ]; then composer require --dev phpstan/phpstan vendor/bin/phpstan analyse fi after_script: - | if [ $TASK_TESTS_COVERAGE == 1 ]; then travis_retry wget https://scrutinizer-ci.com/ocular.phar php ocular.phar code-coverage:upload --format=php-clover coverage.clover fi