2

I have a PHP Application (Symfony and ezplatform) and want to run Functional tests Automatically after every push in git.

the requirement for that is that i need A database where I can put my latest dump of DB on it and then run the tests against it.

is that possible to do it in CodeShip for a PHP application at all ? and if yes, how ?

Amir Koklan
  • 897
  • 2
  • 12
  • 32

1 Answers1

1

You can configure which commands should be used when Codeship starts your tests, there you can add things like php app/console doctrine:database:create just think about what you have to do when you setup your project from scratch and write it down (in bash).

Insax
  • 612
  • 4
  • 10
  • I have the latest dump in my git. so basically what I need to run is something like: " mysql -u user -p Password db < mydump.sql " So I need the variables to fill my command and in my config_test.yml – Amir Koklan May 08 '17 at 07:57
  • credentials for MySQL are available via the `MYSQL_USER` and `MYSQL_PASSWORD` environment variables, the default databases created are called `development` and `test`, but you can create others. See https://documentation.codeship.com/basic/databases/mysql/ for more information. – mlocher May 08 '17 at 08:34
  • Yeah, I have seen that Page but it is for Ruby Projects and I still could not figure out how to run the command! "mysql -u MYSQL_USER - MYSQL_PASSWORD db < dump.sql " ?! – Amir Koklan May 08 '17 at 18:50
  • have u figured it out Amir? If so,please paste your solution – Paul Preibisch Apr 26 '18 at 21:32