From a7ee60f9d25700d167772bf9b5631274e15d0279 Mon Sep 17 00:00:00 2001 From: Alexey Rogachev Date: Thu, 1 Dec 2016 10:20:13 +0100 Subject: [PATCH 1/4] Switch travis OR from precise to trusty Switch from precise to trusty is required mainly because of jsdom dependency. It requires Node.js > 4. Precise has very old Node.js and NPM versions and they can not be updated because of default versions of C++ compilers. While it's possible somehow to install Node 6 on Precise, see this [document](https://github.com/nodesource/distributions/blob/master/OLDER_DISTROS.md), I think this is not elegant solution and I'm not 100% sure it will work correctly with Travis and container-based precise dist. Trusty has v6.3.0 by default which is enough and way better and newer. --- .travis.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.travis.yml b/.travis.yml index 46e676e6eb..4b83d12287 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,18 @@ +# +# Travis Setup +# + +# use ubuntu trusty for newer version of nodejs, used for JS testing +dist: trusty + # faster builds on new travis setup not using sudo sudo: false + + +# +# Test Matrix +# + language: php php: From 8c0a431c662d92a89b39086f19668e70a744ab75 Mon Sep 17 00:00:00 2001 From: Alexey Rogachev Date: Thu, 1 Dec 2016 10:33:59 +0100 Subject: [PATCH 2/4] Fix MySQL database setup for ubuntu trusty --- .travis.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4b83d12287..06be0eb69e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,18 +99,12 @@ before_script: - psql --version # initialize databases - - | - if [[ $TRAVIS_PHP_VERSION != hhv* ]]; then - mysql -e 'CREATE DATABASE `yiitest`;' - fi - - | - if [[ $TRAVIS_PHP_VERSION = hhv* ]]; then - mysql -u root -e 'CREATE DATABASE yiitest;'; - mysql -u root -e 'CREATE USER 'travis'@'localhost' IDENTIFIED WITH mysql_native_password;' - mysql -u root -e 'GRANT ALL PRIVILEGES ON *.* TO 'travis'@'localhost' WITH GRANT OPTION;' - fi + - mysql -e 'CREATE DATABASE `yiitest`;'; + - mysql -e "CREATE USER 'travis'@'localhost' IDENTIFIED WITH mysql_native_password;"; + - mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'travis'@'localhost' WITH GRANT OPTION;"; - psql -U postgres -c 'CREATE DATABASE yiitest;'; + # enable code coverage on PHP 5.6, only one PHP version needs to generate coverage data - | if [ $TRAVIS_PHP_VERSION = '5.6' ]; then PHPUNIT_FLAGS="--coverage-clover=coverage.clover" From e94ca4793be2c00659e3ebd7f2bf29741ef3f593 Mon Sep 17 00:00:00 2001 From: Alexey Rogachev Date: Thu, 1 Dec 2016 10:50:21 +0100 Subject: [PATCH 3/4] Install APC on Ubuntu trusty Trusty does not have APC preinstalled (see https://github.com/travis-ci/travis-ci/issues/5618, https://github.com/travis-ci/travis-ci/issues/6853) so we need to install it manually using PECL. `yes ''` allows to skip prompts and fill it with default values. --- tests/data/travis/apc-setup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/data/travis/apc-setup.sh b/tests/data/travis/apc-setup.sh index d64e8a5398..d9b93a0cfb 100755 --- a/tests/data/travis/apc-setup.sh +++ b/tests/data/travis/apc-setup.sh @@ -1,8 +1,9 @@ #!/bin/sh -e if [ "$(expr "$TRAVIS_PHP_VERSION" "<" "5.5")" -eq 1 ]; then - echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + yes '' | pecl install apc + #echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini else echo "Not installing APC as it is not available in PHP 5.5 anymore." -fi \ No newline at end of file +fi From 4e4a6f69e3c88f87382da95cb6dc3ce28e4e538c Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Thu, 1 Dec 2016 11:11:28 +0100 Subject: [PATCH 4/4] remove CUBRID env from travis it is unused --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 06be0eb69e..087851bb6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,6 @@ matrix: - mysql-client-5.6 services: - mysql - env: CUBRID_VERSION=9.3.0/CUBRID-9.3.0.0206 CUBRID_PDO_VERSION=9.3.0.0001 # test against the latest HHVM version by using a newer image - php: hhvm sudo: true @@ -55,12 +54,9 @@ matrix: services: - mysql - postgresql - env: CUBRID_VERSION=9.3.0/CUBRID-9.3.0.0206 CUBRID_PDO_VERSION=9.3.0.0001 allow_failures: - php: nightly -env: - - CUBRID_VERSION=9.3.0/CUBRID-9.3.0.0206 CUBRID_PDO_VERSION=9.3.0.0001 services: - memcached @@ -68,7 +64,6 @@ services: # cache vendor dirs cache: directories: -# - cubrid/9.3.0 - vendor - $HOME/.composer/cache