Skip to content
This repository
Browse code

Fixed Travis CI and make it use SQLite

  • Loading branch information...
commit 2c62dda47ac398d15d002bd26b46cec01d6315a9 1 parent e003796
Sam Minnée authored August 14, 2012
22  tests/travis/_config.php
... ...
@@ -0,0 +1,22 @@
  1
+<?php
  2
+
  3
+global $project;
  4
+$project = 'mysite';
  5
+
  6
+global $database;
  7
+$database = '';
  8
+
  9
+require_once('conf/ConfigureFromEnv.php');
  10
+
  11
+global $databaseConfig;
  12
+$databaseConfig['memory'] = true;
  13
+$databaseConfig['path'] = dirname(dirname(__FILE__)) .'/assets/';
  14
+
  15
+MySQLDatabase::set_connection_charset('utf8');
  16
+
  17
+// Set the current theme. More themes can be downloaded from
  18
+// http://www.silverstripe.org/themes/
  19
+SSViewer::set_theme('simple');
  20
+
  21
+// Enable nested URLs for this site (e.g. page/sub-page/)
  22
+if(class_exists('SiteTree')) SiteTree::enable_nested_urls();
4  tests/travis/_ss_environment.php
@@ -4,8 +4,8 @@
4 4
 define('SS_ENVIRONMENT_TYPE', 'dev');
5 5
 
6 6
 /* Database connection */ 
7  
-define('SS_DATABASE_CLASS', 'SQLite3Database');
8  
-define('SS_DATABASE_SERVER', ':memory:'); 
  7
+define('SS_DATABASE_CLASS', 'SQLitePDODatabase');
  8
+define('SS_DATABASE_SERVER', 'localhost'); 
9 9
 define('SS_DATABASE_USERNAME', 'root'); 
10 10
 define('SS_DATABASE_PASSWORD', '');
11 11
 define('SS_DATABASE_CHOOSE_NAME', true);
4  tests/travis/before_script
... ...
@@ -1,6 +1,8 @@
1 1
 BUILD_DIR=$1
2  
-git clone git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR
  2
+git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR
  3
+git clone --depth=100 --quiet git://github.com/silverstripe-labs/silverstripe-sqlite3.git $BUILD_DIR/sqlite3
3 4
 cp ./tests/travis/_ss_environment.php $BUILD_DIR
  5
+cp ./tests/travis/_config.php $BUILD_DIR/mysite
4 6
 cp -r . $BUILD_DIR/framework
5 7
 
6 8
 cd $BUILD_DIR

0 notes on commit 2c62dda

Please sign in to comment.
Something went wrong with that request. Please try again.