dist: bionic sudo: false language: php matrix: include: - php: 7.2 env: WITH_PHPUNIT=true - php: 7.3 env: WITH_PHPUNIT=true - php: 7.3 env: WITH_PHPUNIT=true WITH_COVERAGE=true - php: 7.4 env: WITH_PHPUNIT=true - php: 8.0 env: WITH_PHPUNIT=true cache: directories: - $HOME/.composer/cache - $HOME/.php-cs-fixer before_install: - | if [[ "$WITH_COVERAGE" != "true" ]]; then phpenv config-rm xdebug.ini fi if [[ "$WITH_CS" != "true" ]]; then composer remove friendsofphp/php-cs-fixer --dev --no-update fi - composer validate install: - composer install --no-interaction --prefer-source before_script: - mkdir -p "$HOME/.php-cs-fixer" - mkdir -p build/logs script: - | if [[ "$WITH_CS" == "true" ]]; then vendor/bin/php-cs-fixer fix --config=.php_cs.dist --verbose --diff --dry-run --diff-format=udiff fi - | if [[ "$WITH_PHPUNIT" == "true" ]]; then if [[ "$WITH_COVERAGE" == "true" ]]; then vendor/bin/phpunit --coverage-clover=build/logs/coverage.clover else vendor/bin/phpunit --no-coverage fi fi after_script: - | if [[ "$WITH_COVERAGE" == "true" ]]; then wget https://scrutinizer-ci.com/ocular.phar php ocular.phar code-coverage:upload --format=php-clover build/logs/coverage.clover fi