I use CircleCI
to run JS
and PHP
test (Protractor/ Phpunit
).
I would like use parallelism to win time, but I don't know configure the parallelism. I activate the parallelism in the circle parameters (2 containers).
My actual circle configuration (circle.yml) :
# Depend de app/config/parameters.circle.yml (parametre symfony pour circle) et app/config/apache.circle (configuration d'Apache pour Circle)
# Configuration du serveur
machine:
php:
version: 5.4.21
timezone:
Europe/Paris
hosts:
bluegrey.circle.dev: 127.0.0.1
dependencies:
pre:
# SauceConnect (Angular)
- wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz
- tar -xzf sc-latest-linux.tar.gz
- ./bin/sc -u johnnyEvo -k xxx:
background: true
pwd: sc-*-linux
# Installation protractor (Angular)
- npm install -g protractor
# On active XDebug
- sed -i 's/^;//' ~/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini
- echo "xdebug.max_nesting_level = 250" > ~/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini
# Configuration d'Apache
- cp app/config/apache.circle /etc/apache2/sites-available
- a2ensite apache.circle
- sudo service apache2 restart
override:
# Composer
- composer install --prefer-source --no-interaction
post:
# Assets
- app/console assetic:dump
# Parameters
- cp app/config/parameters.circle.yml.dist app/config/parameters.yml
database:
pre:
# Base de données (test)
- app/console doctrine:database:create --env=test --no-interaction
- app/console doctrine:schema:update --force --env=test --no-interaction
# Base de données (prod/ angular)
- app/console doctrine:database:drop --no-interaction --force
- app/console doctrine:database:create --no-interaction
- app/console doctrine:schema:update --force --no-interaction
# Fixture
- app/console doctrine:fixture:load --no-interaction
test:
pre:
# Permission pour que Protractor puisse naviguer le site
- sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs app/sessions
- sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs app/sessions
override:
- php -d memory_limit=-1 bin/phpunit -c app
- protractor angutest