Skip to content

Instantly share code, notes, and snippets.

@frne
Created July 4, 2012 09:42
Show Gist options
  • Save frne/3046395 to your computer and use it in GitHub Desktop.
Save frne/3046395 to your computer and use it in GitHub Desktop.
# The test environment we want to use (PHP 5.3)
language: php
php:
- 5.3
- 5.4
before_script:
# Packages installation
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-mysql php5-sqlite
# Apache webserver configuration
- echo "Alias /behat $(pwd)/web" | sudo tee -a /etc/apache2/sites-available/default
- sudo a2enmod rewrite
- sudo /etc/init.d/apache2 restart
# Database creation
- mysql -e 'CREATE DATABASE test_myapp_test;'
# Symfony 2 application configuration
- sed s/%database_name%/myapp_test/ app/config/parameters.ini-dist | sed s/%database_login%/root/ | sed s/%database_password%// > app/config/parameters.ini
- bin/vendors install
- app/console --env=test doctrine:schema:create
- sudo chmod -R 777 app/cache app/logs
- sed 's/%hostname%/localhost\/behat/' behat.yml-dist > behat.yml
script:
# Launch test suite
- php behat.phar --profile=travis @BehatViewerBundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment