diff --git a/.travis.yml b/.travis.yml index 19f757f..2fb1fd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,37 +6,71 @@ cache: directories: - $HOME/.composer/cache +env: + global: + - COMPOSER_ARGS="--no-interaction" + - COVERAGE_DEPS="php-coveralls/php-coveralls" + matrix: - fast_finish: true include: - php: 5.6 env: - - TEST_COVERAGE=true + - DEPS=lowest + - php: 5.6 + env: + - DEPS=locked + - LEGACY_DEPS="phpunit/phpunit" + - php: 5.6 + env: + - DEPS=latest - php: 7 env: + - DEPS=lowest + - php: 7 + env: + - DEPS=locked + - LEGACY_DEPS="phpunit/phpunit" + - php: 7 + env: + - DEPS=latest + - php: 7.1 + env: + - DEPS=lowest + - php: 7.1 + env: + - DEPS=locked - CS_CHECK=true + - TEST_COVERAGE=true - php: 7.1 - - php: hhvm - allow_failures: - - php: hhvm - -notifications: - irc: "irc.freenode.org#apigility-dev" - email: false + env: + - DEPS=latest + - php: 7.2 + env: + - DEPS=lowest + - php: 7.2 + env: + - DEPS=locked + - php: 7.2 + env: + - DEPS=latest before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi - - travis_retry composer self-update install: - - if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update "satooshi/php-coveralls:^1.0" ; fi - - travis_retry composer install --no-interaction - - composer show + - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs + - if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi + - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi + - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi + - stty cols 120 && composer show script: - - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; fi - - if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi - - if [[ $CS_CHECK == 'true' ]]; then composer cs ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi + - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi after_script: - - if [[ $TEST_COVERAGE == 'true' ]]; then composer coveralls ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi + +notifications: + email: false