I've just set up my latest Symfony project on CircleCI and it's working really well. CircleCI is very good, and the staff are amazingly helpful (even though I haven't given them any money yet). I spent a morning trying to set up Travis, without any luck. Seems to be some issue with private repos owned by organisations.
If you're trying to do your parameters the new Symfony 2.3 way, it takes a little extra work. And if your tests need the database, it takes a tiny bit more.
circle.yml
machine:
php:
version: 5.4.21
dependencies:
override:
- composer install --prefer-source --no-interaction
- cp app/config/parameters_test.circle.yml app/config/parameters_test.yml
- app/console doctrine:database:drop --env=test --no-interaction --force
- app/console doctrine:database:create --env=test --no-interaction
- app/console doctrine:migrations:migrate --env=test --no-interaction
app/config/parameters_test.circle.yml
parameters:
database_name: circle_test
database_user: ubuntu
database_password: null
Using environment variables didn't work that well for me, because I've got a local testing environment as well. So keeping two versions (local and CircleCI) of the testing parameters file seemed to work better. I'll still probably use environment variables for production, although that would be something else that didn't get tested.
Comments
No comments yet.
Leave a comment