From 3197d64ae5c26b55fa8bfab2b1feb9fa2bc64b77 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E0=BE=85=E0=BC=BB=20=C7=AC=C9=80=C4=A7=20=E0=BC=84?= =?utf8?q?=E0=BC=86=E0=BD=89?= Date: Fri, 14 Apr 2017 22:03:02 +0200 Subject: [PATCH] Select PHPUnit version --- .travis.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.travis.yml b/.travis.yml index a8f1c68..c71daf8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,11 @@ php: - 5.6 - 7.0 - 7.1 + - hhvm + +matrix: + allow_failures: + - php: hhvm env: - DB=mysql @@ -18,6 +23,21 @@ before_script: - cp user/languages/fr/fr_FR.* user/languages - mysql -e 'create database IF NOT EXISTS yourls_tests;' - cp tests/yourls-tests-config-travis.php user/config.php + - | + case "$TRAVIS_PHP_VERSION" in + 7.1|7.0|hhvm) + echo "Using PHPUnit 5.7" + composer global require "phpunit/phpunit=5.7.*" + ;; + 5.6|5.5|5.4|5.3) + echo "Using PHPUnit 4.8" + composer global require "phpunit/phpunit=4.8.*" + ;; + *) + echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION" + exit 1 + ;; + esac - phpunit --version script: phpunit --configuration ./tests/phpunit-travis.xml.dist -- 2.42.0