Skip to content

Commit

Permalink
Merge branch 'feature/update-travis-env' of https://github.com/jrfnl/…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Jul 20, 2020
2 parents 7ffd639 + 751ec21 commit 802a514
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
sudo: false
os: linux
dist: xenial
language: php
dist: trusty

matrix:
jobs:
fast_finish: true
include:
- php: 5.4
dist: trusty
- php: 5.5
dist: trusty
- php: 5.5
dist: trusty
env: CUSTOM_INI=1 XMLLINT=1
addons:
apt:
Expand All @@ -19,28 +22,24 @@ matrix:
env: CUSTOM_INI=1 PEAR_VALIDATE=1
- php: 7.1
- php: 7.2
env: PHPUNIT_INCOMPAT=1
- php: 7.3
env: PHPUNIT_INCOMPAT=1
- php: 7.4
env: PHPUNIT_INCOMPAT=1
- php: 7.4
env: PHPSTAN=1 PHPUNIT_INCOMPAT=1
env: PHPSTAN=1
addons:
apt:
packages:
- libonig-dev
# Nightly is PHP 8.0 since Feb 2019.
- php: nightly
env: PHPUNIT_INCOMPAT=1
addons:
apt:
packages:
- libonig-dev

allow_failures:
- php: 7.4
env: PHPSTAN=1 PHPUNIT_INCOMPAT=1
env: PHPSTAN=1
- php: nightly

before_install:
Expand All @@ -49,9 +48,9 @@ before_install:
- phpenv config-rm xdebug.ini || echo 'No xdebug config.'
# PHPUnit 8.x is not (yet) supported, so prevent issues with Travis images using it.
- |
if [[ $PHPUNIT_INCOMPAT == "1" && $TRAVIS_PHP_VERSION != "nightly" ]]; then
if [[ $TRAVIS_PHP_VERSION != "nightly" ]]; then
composer install
elif [[ $PHPUNIT_INCOMPAT == "1" && $TRAVIS_PHP_VERSION == "nightly" ]]; then
elif [[ $TRAVIS_PHP_VERSION == "nightly" ]]; then
// Allow installing "incompatible" PHPUnit version on PHP 8/nightly.
composer install --ignore-platform-reqs
fi
Expand All @@ -62,12 +61,7 @@ before_script:

script:
- php bin/phpcs --config-set php_path php
- |
if [[ $PHPUNIT_INCOMPAT != "1" ]]; then
phpunit tests/AllTests.php
else
vendor/bin/phpunit tests/AllTests.php
fi
- vendor/bin/phpunit tests/AllTests.php
- if [[ $CUSTOM_INI != "1" ]]; then php bin/phpcs --no-cache --parallel=1; fi
- if [[ $CUSTOM_INI != "1" && $TRAVIS_PHP_VERSION != "nightly" ]]; then pear package-validate package.xml; fi
- if [[ $PEAR_VALIDATE == "1" ]]; then php scripts/validate-pear-package.php; fi
Expand Down

0 comments on commit 802a514

Please sign in to comment.