language: php sudo: require env: - SETUP_MODE=update TEST_SUITE=1 - SETUP_MODE=update TEST_SUITE=2 php: - 5.5 - 5.6 matrix: fast_finish: true services: - mysql - memcached - redis before_install: - nvm install 0.12.0 - phpenv config-rm xdebug.ini - composer self-update --no-progress --no-interaction - sudo apt-get purge elasticsearch - curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.6.0.deb && sudo dpkg -i --force-confnew elasticsearch-1.6.0.deb - sudo /usr/share/elasticsearch/bin/plugin install elasticsearch/elasticsearch-analysis-icu/2.6.0 - sudo service elasticsearch start - echo 'session.cache_limiter = ""' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo 'extension="redis.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo 'extension="memcache.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo 'extension="memcached.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo "extension=zmq.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - yes | pecl install imagick install: - travis_retry composer install --optimize-autoloader --dev --prefer-source - travis_retry npm install before_script: - mysql -e 'CREATE DATABASE update39_test;CREATE DATABASE ab_test;CREATE DATABASE db_test;SET @@global.sql_mode=STRICT_ALL_TABLES;SET @@global.max_allowed_packet=33554432;SET @@global.wait_timeout=999999;' - "./bin/developer system:uninstall" - "./bin/setup system:install --email=test@phraseanet.com --password=test --db-host=127.0.0.1 --db-user=root --db-template=fr --db-password= --databox=db_test --appbox=ab_test --server-name=http://127.0.0.1 -y;" - | if [ "$SETUP_MODE" = "update" ]; then ./bin/developer ini:reset --email=test@phraseanet.com --password=test --run-patches --no-setup-dbs; php resources/hudson/cleanupSubdefs.php; fi - mysql -e 'SELECT ab.version AS applibox_version, db.value AS databox_version FROM ab_test.sitepreff ab, db_test.pref db WHERE db.prop = "version"' - "./bin/developer ini:setup-tests-dbs" - "./bin/console searchengine:index:create" - "./bin/developer phraseanet:regenerate-sqlite" - "./bin/developer phraseanet:generate-js-fixtures" script: - "./node_modules/.bin/gulp test" - | if [ "$TEST_SUITE" = "1" ]; then "./bin/phpunit" "tests/classes/"; else "./bin/phpunit" "tests/Alchemy/"; fi notifications: hipchat: rooms: secure: SGRF/sejAh54kp5p9C49TxJ0SE/WCZS/dM9L7Bjqfk2zxeB11s0k6Z0QaRJhwWtv7FETLVRF8/ZR6penJ3ibJj53ixzx2YzhuONIWYNlVGgnjnCsBST7eUzZesEbpob2p2oDchkG6OEG72nZJF3AQImeJvq0iWmdnhfJHFz0VYo=