You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
119 lines
3.3 KiB
119 lines
3.3 KiB
# faster builds on new travis setup not using sudo |
|
sudo: false |
|
language: php |
|
|
|
php: |
|
- 5.4 |
|
- 5.5 |
|
- 5.6 |
|
- 7.0 |
|
- 7.1 |
|
- nightly |
|
|
|
matrix: |
|
fast_finish: true |
|
include: |
|
# Test against HHVM 3.12 LTS version by using trusty |
|
- php: hhvm-3.12 |
|
sudo: true |
|
dist: trusty |
|
group: edge # Use edge image until the next travis CI image update |
|
addons: |
|
apt: |
|
packages: |
|
- mysql-server-5.6 |
|
- mysql-client-core-5.6 |
|
- 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 |
|
dist: trusty |
|
group: edge # Use edge image until the next travis CI image update |
|
addons: |
|
postgresql: "9.3" |
|
apt: |
|
packages: |
|
- mysql-server-5.6 |
|
- mysql-client-core-5.6 |
|
- mysql-client-5.6 |
|
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 |
|
|
|
# cache vendor dirs |
|
cache: |
|
directories: |
|
# - cubrid/9.3.0 |
|
- vendor |
|
- $HOME/.composer/cache |
|
|
|
# try running against postgres 9.3 |
|
addons: |
|
postgresql: "9.3" |
|
|
|
install: |
|
- | |
|
if [[ $TRAVIS_PHP_VERSION != '5.6' && $TRAVIS_PHP_VERSION != hhv* ]]; then |
|
# disable xdebug for performance reasons when code coverage is not needed. note: xdebug on hhvm is disabled by default |
|
phpenv config-rm xdebug.ini || echo "xdebug is not installed" |
|
fi |
|
- travis_retry composer self-update && composer --version |
|
- travis_retry composer global require "fxp/composer-asset-plugin:^1.2.0" |
|
- export PATH="$HOME/.composer/vendor/bin:$PATH" |
|
# core framework: |
|
- travis_retry composer update --prefer-dist --no-interaction |
|
- tests/data/travis/apc-setup.sh |
|
- tests/data/travis/memcache-setup.sh |
|
# - tests/data/travis/cubrid-setup.sh |
|
|
|
before_script: |
|
# show some versions and env information |
|
- php -r "echo INTL_ICU_VERSION . \"\n\";" |
|
- php -r "echo INTL_ICU_DATA_VERSION . \"\n\";" |
|
- mysql --version |
|
- 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 |
|
- psql -U postgres -c 'CREATE DATABASE yiitest;'; |
|
|
|
- | |
|
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then |
|
PHPUNIT_FLAGS="--coverage-clover=coverage.clover" |
|
fi |
|
|
|
|
|
script: |
|
# validate composer.json |
|
- composer validate --no-check-lock |
|
- cd framework && composer validate --no-check-lock && cd .. |
|
# run PHPUnit |
|
- vendor/bin/phpunit --verbose $PHPUNIT_FLAGS --exclude-group mssql,oci,wincache,xcache,zenddata,cubrid |
|
|
|
after_script: |
|
- | |
|
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then |
|
travis_retry wget https://scrutinizer-ci.com/ocular.phar |
|
php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
|
fi
|
|
|