From 78117941c05ec737bd701df0d36e1e3acb0f61d1 Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Thu, 13 Jul 2017 12:06:06 +0200 Subject: [PATCH 1/5] Add travis template --- template/.travis.yml | 81 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 template/.travis.yml diff --git a/template/.travis.yml b/template/.travis.yml new file mode 100644 index 0000000..3dde417 --- /dev/null +++ b/template/.travis.yml @@ -0,0 +1,81 @@ +sudo: false + +language: php + +cache: + directories: + - $HOME/.composer/cache + - $HOME/.local + +env: + global: + - COMPOSER_ARGS="--no-interaction" + - COVERAGE_DEPS="satooshi/php-coveralls" + - LEGACY_DEPS="phpunit/phpunit" + +matrix: + 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 + - CS_CHECK=true + - php: 7 + env: + - DEPS=latest + - php: 7.1 + env: + - DEPS=lowest + - php: 7.1 + env: + - DEPS=locked + - php: 7.1 + env: + - DEPS=latest + - php: nightly + env: + - DEPS=lowest + - php: nightly + env: + - DEPS=locked + - php: nightly + env: + - DEPS=latest + allow_failures: + - php: nightly + +before_install: + - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi + - 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 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 + - export COLUMNS=120 + - composer show + +script: + - 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 upload-coverage ; fi + +notifications: + email: false From 36dfb70fb16a223d4155faf80dee8e0680c7b851 Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Sat, 15 Jul 2017 08:02:25 +0200 Subject: [PATCH 2/5] Remove $HOME/.local from cache Was used for docs generation? --- template/.travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/template/.travis.yml b/template/.travis.yml index 3dde417..a2ee62c 100644 --- a/template/.travis.yml +++ b/template/.travis.yml @@ -5,7 +5,6 @@ language: php cache: directories: - $HOME/.composer/cache - - $HOME/.local env: global: From e04cdd7185c987fb86aa9db91da7d48c7150c166 Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Wed, 2 Aug 2017 21:14:39 +0200 Subject: [PATCH 3/5] Remove PHP 5.6/7.0 support and legacy dependencies --- template/.travis.yml | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/template/.travis.yml b/template/.travis.yml index a2ee62c..3d25071 100644 --- a/template/.travis.yml +++ b/template/.travis.yml @@ -10,36 +10,17 @@ env: global: - COMPOSER_ARGS="--no-interaction" - COVERAGE_DEPS="satooshi/php-coveralls" - - LEGACY_DEPS="phpunit/phpunit" matrix: 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 - - CS_CHECK=true - - 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 env: - DEPS=latest @@ -61,7 +42,6 @@ before_install: 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 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 From 63306632057633b813d9b54f364fbb1fa2913bfa Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Wed, 2 Aug 2017 21:51:41 +0200 Subject: [PATCH 4/5] Use stty cols 120 to display composer show package versions and descriptions COLUMNS=120 doesn't seem to do anything. --- template/.travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/template/.travis.yml b/template/.travis.yml index 3d25071..2b45a32 100644 --- a/template/.travis.yml +++ b/template/.travis.yml @@ -45,9 +45,7 @@ install: - 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 - - export COLUMNS=120 - - composer show + - stty cols 120 && composer show script: - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi From ee1191a285f04763f3a1de7fd624e55065e1c7fc Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Wed, 2 Aug 2017 22:24:31 +0200 Subject: [PATCH 5/5] Use PHP 7.2 instead of nightly Until it's stable it should allow failures. --- template/.travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template/.travis.yml b/template/.travis.yml index 2b45a32..51c8e16 100644 --- a/template/.travis.yml +++ b/template/.travis.yml @@ -24,17 +24,17 @@ matrix: - php: 7.1 env: - DEPS=latest - - php: nightly + - php: 7.2 env: - DEPS=lowest - - php: nightly + - php: 7.2 env: - DEPS=locked - - php: nightly + - php: 7.2 env: - DEPS=latest allow_failures: - - php: nightly + - php: 7.2 before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi