Created
October 31, 2014 20:36
-
-
Save ricbra/c35971f989960fbcfac4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# we need to define our credentials here via environment vars as thats the way we get mysql | |
# credentials in Codeship. | |
if [ -z $SYMFONY__TEST_DATABASE_USER ]; then | |
export SYMFONY__TEST_DATABASE_USER=root | |
fi | |
if [ -z $SYMFONY__TEST_DATABASE_PASSWORD ]; then | |
export SYMFONY__TEST_DATABASE_PASSWORD=yourdevweakdbpass | |
fi | |
if [ -z $SYMFONY__TEST_DATABASE_NAME ]; then | |
export SYMFONY__TEST_DATABASE_NAME=test | |
fi | |
# Setup DB and clear cache | |
php ./app/console --env=test doctrine:database:drop --force | |
php ./app/console --env=test doctrine:database:create | |
php ./app/console --env=test doctrine:migrations:migrate --no-interaction | |
php ./app/console --env=test cache:clear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment