Skip to content

Instantly share code, notes, and snippets.

@ricbra
Created October 31, 2014 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricbra/c35971f989960fbcfac4 to your computer and use it in GitHub Desktop.
Save ricbra/c35971f989960fbcfac4 to your computer and use it in GitHub Desktop.
#!/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