2011-11-10 03:27:56 +00:00
|
|
|
language: php
|
|
|
|
|
2013-12-14 12:00:39 +00:00
|
|
|
matrix:
|
2014-07-06 15:36:42 +01:00
|
|
|
include:
|
2014-11-19 21:23:28 +00:00
|
|
|
- php: 5.5.9
|
2014-12-26 09:21:27 +00:00
|
|
|
- php: 5.5
|
|
|
|
- php: 5.6
|
2015-01-24 23:32:14 +00:00
|
|
|
- php: 5.5.9
|
2015-02-24 08:06:17 +00:00
|
|
|
env: deps=low
|
2014-12-26 09:21:27 +00:00
|
|
|
- php: 5.6
|
2015-02-24 08:06:17 +00:00
|
|
|
env: deps=high
|
2015-02-26 09:25:20 +00:00
|
|
|
- php: nightly
|
2014-12-26 09:21:27 +00:00
|
|
|
- php: hhvm-nightly
|
|
|
|
allow_failures:
|
2015-02-26 09:25:20 +00:00
|
|
|
- php: nightly
|
2014-12-26 09:21:27 +00:00
|
|
|
- php: hhvm-nightly
|
|
|
|
fast_finish: true
|
2013-01-04 08:48:20 +00:00
|
|
|
|
2013-12-20 14:57:17 +00:00
|
|
|
services: mongodb
|
|
|
|
|
2014-07-06 15:36:42 +01:00
|
|
|
env:
|
|
|
|
global:
|
2015-02-24 08:06:17 +00:00
|
|
|
- deps=no
|
|
|
|
- SYMFONY_DEPRECATIONS_HELPER=weak
|
2014-07-06 15:36:42 +01:00
|
|
|
|
2014-09-02 15:17:55 +01:00
|
|
|
before_install:
|
2014-01-26 22:20:49 +00:00
|
|
|
- travis_retry sudo apt-get install parallel
|
2014-12-13 11:05:29 +00:00
|
|
|
- composer self-update
|
2015-02-26 09:25:20 +00:00
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then phpenv config-rm xdebug.ini; fi;
|
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
|
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
|
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then pecl install -f memcached-2.1.0; fi;
|
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
|
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then php -i; fi;
|
2014-03-29 06:23:46 +00:00
|
|
|
- sudo locale-gen fr_FR.UTF-8 && sudo update-locale
|
2015-01-03 11:15:23 +00:00
|
|
|
# Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built
|
2015-01-05 14:38:29 +00:00
|
|
|
- if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;
|
2013-09-12 22:41:34 +01:00
|
|
|
|
2014-09-02 15:17:55 +01:00
|
|
|
install:
|
2015-03-12 14:47:10 +00:00
|
|
|
- if [ "$deps" = "no" ]; then export SYMFONY_DEPRECATIONS_HELPER=strict; fi;
|
2015-02-24 08:06:17 +00:00
|
|
|
- if [ "$deps" = "no" ]; then composer --prefer-source install; fi;
|
2015-03-03 10:27:01 +00:00
|
|
|
- components=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n')
|
|
|
|
- if [ "$deps" != "no" ]; then sh .travis.sh $TRAVIS_BRANCH $components; fi;
|
2014-09-02 15:17:55 +01:00
|
|
|
|
2013-09-12 22:41:34 +01:00
|
|
|
script:
|
2015-03-02 20:53:03 +00:00
|
|
|
- if [ "$deps" = "no" ]; then echo "$components" | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
|
2015-02-24 08:06:17 +00:00
|
|
|
- if [ "$deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi;
|
2015-03-02 20:53:03 +00:00
|
|
|
- if [ "$deps" = "high" ]; then echo "$components" | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; phpunit --exclude-group tty,benchmark,intl-data,legacy || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
|
|
|
|
- if [ "$deps" = "low" ]; then echo "$components" | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
|