Merge branch 'prepare-travis-for-js'

* prepare-travis-for-js:
  remove CUBRID env from travis it is unused
  Install APC on Ubuntu trusty
  Fix MySQL database setup for ubuntu trusty
  Switch travis OR from precise to trusty
This commit is contained in:
Carsten Brandt
2016-12-01 11:12:44 +01:00
2 changed files with 20 additions and 17 deletions

View File

@ -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:
@ -26,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
@ -42,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
@ -55,7 +64,6 @@ services:
# cache vendor dirs
cache:
directories:
# - cubrid/9.3.0
- vendor
- $HOME/.composer/cache
@ -86,18 +94,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"

View File

@ -1,7 +1,8 @@
#!/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."