diff --git a/.travis.yml b/.travis.yml index 2b99503..eb9aff6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,13 @@ language: php matrix: include: - - php: 7.1 - - php: 7.2 - - php: 7.3 - - php: 7.4snapshot - env: PHP_CS_FIXER_IGNORE_ENV=1 - - php: nightly - env: PHP_CS_FIXER_IGNORE_ENV=1 + - php: 7.1 + - php: 7.2 + - php: 7.3 + - php: 7.4snapshot + env: PHP_CS_FIXER_IGNORE_ENV=1 + - php: nightly + env: PHP_CS_FIXER_IGNORE_ENV=1 fast_finish: true cache: @@ -19,17 +19,18 @@ cache: before_script: - echo $TRAVIS_PHP_VERSION - php -v - - PHP_VERSION=$(php -r "echo PHP_VERSION;") + - PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION ;") - echo $PHP_VERSION - composer install -o -q --no-suggest - - if [[ "$PHP_VERSION" == '7.3' ]]; then composer install satooshi/php-coveralls ; fi + - if [[ "$PHP_VERSION" == '7.3' ]]; then composer require satooshi/php-coveralls ; fi script: - - make phpcs - - if [[ "$PHP_VERSION" < '8.0' ]]; then make phpstan ; fi - - mkdir -p build/logs - - if [[ "$TRAVIS_PHP_VERSION" == '7.3' ]]; then make test-coverage ; fi - - if [[ "$TRAVIS_PHP_VERSION" != '7.3' ]]; then make test ; fi + - if [[ "$PHP_VERSION" < '8.0' ]]; then make phpcs ; fi + - if [[ "$PHP_VERSION" < '8.0' ]]; then make phpstan ; fi + - mkdir -p build/logs + - if [[ "$PHP_VERSION" < '7.4' ]]; then make test ; fi + - if [[ "$PHP_VERSIONN" == '7.4' ]]; then make test-coverage ; fi + - if [[ "$PHP_VERSION" > '7.4' ]]; then make test-php-8 ; fi after_script: - - if [[ "$TRAVIS_PHP_VERSION" == '7.3' ]]; then php vendor/bin/php-coveralls -v ; fi + - if [[ "$PHP_VERSION" == '7.3' ]]; then php vendor/bin/php-coveralls -v ; fi diff --git a/Makefile b/Makefile index 2cb50bf..fd20c7d 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,13 @@ tools/phpunit: mv tools/phpunit-7.phar tools/phpunit chmod +x tools/phpunit +tools/phpunit-9: + wget --directory-prefix=tools --quiet https://phar.phpunit.de/phpunit-9.phar + mv tools/phpunit-9.phar tools/phpunit + chmod +x tools/phpunit + phpcs: tools/php-cs-fixer + rm -f .php_cs.cache composer install --optimize-autoloader --no-dev --no-suggest --quiet tools/php-cs-fixer fix --dry-run --stop-on-violation -v @@ -27,6 +33,10 @@ test: tools/phpunit composer install --optimize-autoloader --no-suggest --quiet tools/phpunit +test-php-8: tools/phpunit-9 + composer install --optimize-autoloader --no-suggest --quiet + tools/phpunit + test-coverage: tools/phpunit composer install --optimize-autoloader --no-suggest --quiet tools/phpunit --coverage-clover build/logs/clover.xml