Permalink
Fetching contributors…
Cannot retrieve contributors at this time
90 lines (81 sloc) 2.15 KB
sudo: false
language: php
cache:
directories:
- $HOME/.composer/cache
- vendor
env:
global:
- COMPOSER_ARGS="--no-interaction"
- LATEST_DEPS="zendframework/zend-mvc-console"
- LEGACY_DEPS="phpunit/phpunit"
matrix:
fast_finish: true
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- TEST_COVERAGE=true
- php: 5.6
env:
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- php: 7
env:
- DEPS=latest
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=locked
- CS_CHECK=true
- php: 7.1
env:
- DEPS=latest
- php: 7.2
env:
- DEPS=lowest
- php: 7.2
env:
- DEPS=locked
- CS_CHECK=true
- php: 7.2
env:
- DEPS=latest
- php: nightly
env:
- DEPS=lowest
- php: nightly
env:
- DEPS=locked
- php: nightly
env:
- DEPS=latest
allow_failures:
- php: 7.2
- php: nightly
before_install:
- travis_retry composer self-update
install:
- travis_retry composer install $COMPOSER_ARGS
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_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
- composer show
script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then php build/coverage-checker.php build/clover.xml 70 ; fi
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then php ocular.phar code-coverage:upload --format=php-clover ./build/clover.xml; fi