Fixed Travis CI and make it use SQLite

This commit is contained in:
Sam Minnee 2012-08-14 16:45:13 +12:00
parent e0037967c2
commit 2c62dda47a
3 changed files with 27 additions and 3 deletions

22
tests/travis/_config.php Normal file
View File

@ -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();

View File

@ -4,8 +4,8 @@ ob_start();
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);

View File

@ -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