Files
Phraseanet/circle.yml
jygaulier c6281ae79e PHRAS-2010_circle-crash_master (#2567)
display node, npm & gulp versions
bump npm
2018-05-02 17:44:08 +02:00

67 lines
3.4 KiB
YAML

general:
branches:
ignore:
- '3.6'
- '3.7'
- '3.8'
machine:
php:
version: 7.0.24 #5.6.22
node:
version: stable
services:
- memcached
- redis
- mysql
- rabbitmq-server
dependencies:
cache_directories:
- elasticsearch-2.3.3 # relative to the build directory
- node_modules
- ~/.composer
pre:
- git clone https://github.com/alanxz/rabbitmq-c
- cd rabbitmq-c && git checkout 2ca1774489328cde71195f5fa95e17cf3a80cb8a
- cd rabbitmq-c && git submodule init && git submodule update && autoreconf -i && ./configure && make && sudo make install
- pecl channel-update pear.php.net
- yes '' | pecl install amqp-1.9.3
- yes '' | pecl install imagick
- sudo apt-get install libzmq-dev
- yes '' | pecl install zmq-beta
- echo "extension = amqp.so" > /opt/circleci/php/$(phpenv global)/etc/conf.d/amqp.ini
- echo "extension = zmq.so" > /opt/circleci/php/$(phpenv global)/etc/conf.d/zmq.ini
- echo "date.timezone = UTC" > /opt/circleci/php/$(phpenv global)/etc/conf.d/timezone.ini
- sed -i 's/^\(session.cache_limiter = \).*/\1""/' /opt/circleci/php/$(phpenv global)/etc/php.ini
- npm rebuild node-sass
override:
- composer install --no-progress --no-interaction --optimize-autoloader
post:
- node -v
- npm -v
- npm install
- if [[ ! -e elasticsearch-2.3.3 ]]; then wget --no-check-certificate https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.3.3.tar.gz && tar -xvf elasticsearch-2.3.3.tar.gz && elasticsearch-2.3.3/bin/plugin install analysis-icu; fi
- elasticsearch-2.3.3/bin/elasticsearch: {background: true}
database:
override:
- mysql -u ubuntu -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;';
post:
- "./bin/developer system:uninstall -v"
- "./bin/setup system:install -v --email=test@phraseanet.com --password=test --db-host=127.0.0.1 --db-user=ubuntu --db-template=fr-simple --db-password= --databox=db_test --appbox=ab_test --server-name=http://127.0.0.1 -y;"
- "./bin/developer ini:setup-tests-dbs -v"
- "./bin/console searchengine:index:create -v"
- "./bin/developer phraseanet:regenerate-sqlite -v"
- "./bin/developer phraseanet:generate-js-fixtures -v"
#test:
# override:
# - case $CIRCLE_NODE_INDEX in 0) EXIT=0; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-unit.xml --exclude-group legacy || EXIT=$?; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-no-web.xml --group legacy --exclude-group web || EXIT=$?; exit $EXIT;; 1) php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-web.xml --group web ;; esac:
# #- php -d memory_limit=-1 bin/phpunit -c phpunit.xml.dist;
test:
override:
- case $CIRCLE_NODE_INDEX in 0) EXIT=0; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-unit.xml --exclude-group legacy || EXIT=$?; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-no-web.xml --group legacy --exclude-group web || EXIT=$?; exit $EXIT;; 1) php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-web.xml --group web ;; esac:
parallel: true