2011-11-10 03:27:56 +00:00
|
|
|
language: php
|
|
|
|
|
2015-05-12 10:50:02 +01:00
|
|
|
sudo: false
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt_packages:
|
|
|
|
- parallel
|
|
|
|
- language-pack-fr-base
|
|
|
|
|
2013-12-14 12:00:39 +00:00
|
|
|
matrix:
|
2014-07-06 15:36:42 +01:00
|
|
|
include:
|
2015-07-02 07:16:05 +01:00
|
|
|
- php: hhvm
|
2014-12-26 09:21:27 +00:00
|
|
|
- php: 5.3.3
|
|
|
|
- php: 5.3
|
|
|
|
- php: 5.4
|
|
|
|
- php: 5.5
|
|
|
|
- php: 5.6
|
2015-02-24 08:06:17 +00:00
|
|
|
env: deps=low
|
2015-01-05 14:38:29 +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
|
|
|
allow_failures:
|
2015-02-26 09:25:20 +00:00
|
|
|
- php: nightly
|
2014-12-26 09:21:27 +00:00
|
|
|
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-12-13 11:05:29 +00:00
|
|
|
- composer self-update
|
2015-07-21 14:40:18 +01:00
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
|
2015-05-04 14:28:20 +01:00
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi;
|
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
|
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]] && [ $(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" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then (pecl install -f memcached-2.1.0 && echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Let's continue without memcache extension"; fi;
|
|
|
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php -i; fi;
|
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-08-05 11:11:53 +01:00
|
|
|
- composer --prefer-source install
|
|
|
|
- composer require --no-update phpunit/phpunit '*'
|
|
|
|
- composer require --no-update phpunit/phpunit-mock-objects '2.3.0' # See https://github.com/sebastianbergmann/phpunit-mock-objects/issues/223
|
|
|
|
- composer update --prefer-stable --prefer-source phpunit/phpunit
|
2015-03-03 10:27:01 +00:00
|
|
|
- components=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n')
|
2015-07-21 14:40:18 +01:00
|
|
|
- if [ "$deps" != "no" ]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $components; fi;
|
2015-08-05 11:11:53 +01:00
|
|
|
- PHPUNIT="$(readlink -f ./vendor/bin/phpunit) --colors=always"
|
2014-09-02 15:17:55 +01:00
|
|
|
|
2013-09-12 22:41:34 +01:00
|
|
|
script:
|
2015-08-05 11:11:53 +01: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;
|
|
|
|
- if [ "$deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi;
|
|
|
|
- if [ "$deps" = "high" ]; then echo "$components" | parallel --gnu --keep-order -j10% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; '$PHPUNIT' --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
|
|
|
|
- if [ "$deps" = "low" ]; then echo "$components" | parallel --gnu --keep-order -j10% '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;
|