Skip to content

Commit

Permalink
Fixed Travis CI and make it use SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Minnee committed Aug 14, 2012
1 parent 4d1c2ed commit 0e08840
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
22 changes: 22 additions & 0 deletions tests/travis/_config.php
@@ -0,0 +1,22 @@
<?php

global $project;
$project = 'mysite';

global $database;
$database = '';

require_once('conf/ConfigureFromEnv.php');

global $databaseConfig;
$databaseConfig['memory'] = true;
$databaseConfig['path'] = dirname(dirname(__FILE__)) .'/assets/';

MySQLDatabase::set_connection_charset('utf8');

// Set the current theme. More themes can be downloaded from
// http://www.silverstripe.org/themes/
SSViewer::set_theme('simple');

// Enable nested URLs for this site (e.g. page/sub-page/)
if(class_exists('SiteTree')) SiteTree::enable_nested_urls();
4 changes: 2 additions & 2 deletions tests/travis/_ss_environment.php
Expand Up @@ -4,8 +4,8 @@
define('SS_ENVIRONMENT_TYPE', 'dev');

/* Database connection */
define('SS_DATABASE_CLASS', 'SQLite3Database');
define('SS_DATABASE_SERVER', ':memory:');
define('SS_DATABASE_CLASS', 'SQLitePDODatabase');
define('SS_DATABASE_SERVER', 'localhost');
define('SS_DATABASE_USERNAME', 'root');
define('SS_DATABASE_PASSWORD', '');
define('SS_DATABASE_CHOOSE_NAME', true);
Expand Down
4 changes: 3 additions & 1 deletion tests/travis/before_script
@@ -1,6 +1,8 @@
BUILD_DIR=$1
git clone git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR
git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR
git clone --depth=100 --quiet git://github.com/silverstripe-labs/silverstripe-sqlite3.git $BUILD_DIR/sqlite3
cp ./tests/travis/_ss_environment.php $BUILD_DIR
cp ./tests/travis/_config.php $BUILD_DIR/mysite
cp -r . $BUILD_DIR/framework

cd $BUILD_DIR
Expand Down

0 comments on commit 0e08840

Please sign in to comment.