Skip to content

Commit

Permalink
adjust database setup in travis.yml
Browse files Browse the repository at this point in the history
Tests were failing on Travis only, due to a) database collation not being set, and b) there being no $default database config in the travis.yml file

Signed-off-by: Joshua Paling <[email protected]>
  • Loading branch information
joshuapaling committed Feb 17, 2014
1 parent 7c89dae commit 70fa569
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ env:
before_script:
- git clone --depth 1 --branch $CAKE_VERSION git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp
- cp -R ../migrations plugins/Migrations
- sh -c "mysql -e 'CREATE DATABASE cakephp_test;'"
- sh -c "mysql -e 'CREATE DATABASE cakephp_test COLLATE utf8_general_ci;'"
- sh -c "mysql -e 'CREATE DATABASE cakephp_default COLLATE utf8_general_ci;'"
- echo "<?php
class DATABASE_CONFIG {
public \$test = array(
Expand All @@ -26,6 +27,16 @@ before_script:
'host' => '0.0.0.0',
'login' => 'travis',
'persistent' => false,
'encoding' => 'utf8',
);

public \$default = array(
'datasource' => 'Database/Mysql',
'database' => 'cakephp_default',
'host' => '0.0.0.0',
'login' => 'travis',
'persistent' => false,
'encoding' => 'utf8',
);
}" > app/Config/database.php
- cd app
Expand Down

0 comments on commit 70fa569

Please sign in to comment.