Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated Travis-CI configuration to have a 4 build grid.

The Travis config will now run tests on the following instances

 * 5.3 + SQLite
 * 5.3 + MySQL
 * 5.3 + PostgreSQL
 * 5.4 + MySQL

In other words, with the exception of Windows tech (MSSQL + Win server) this is a wide-coverage build config.
  • Loading branch information...
commit abbce151d9b8f4746d6a3135ebf1d136d6831b47 1 parent 93cdb83
Sam Minnée sminnee authored
13 .travis.yml
View
@@ -1,6 +1,19 @@
language: php
php:
- 5.3
+ - 5.4
+
+env:
+ - TESTDB=SQLITE
+ - TESTDB=MYSQL
+ - TESTDB=PGSQL
+
+matrix:
+ exclude:
+ - php: 5.4
+ env: TESTDB=PGSQL
+ - php: 5.4
+ env: TESTDB=SQLITE
before_script:
- ./tests/travis/before_script ~/builds/ss
28 tests/travis/_ss_environment.php
View
@@ -3,13 +3,33 @@
define('SS_ENVIRONMENT_TYPE', 'dev');
-/* Database connection */
-define('SS_DATABASE_CLASS', 'SQLitePDODatabase');
+/* Database connection */
+$db = getenv('TESTDB');
+switch($db) {
+case "PGSQL";
+ define('SS_DATABASE_CLASS', 'PostgreSQLDatabase');
+ define('SS_DATABASE_USERNAME', 'postgres');
+ define('SS_DATABASE_PASSWORD', '');
+ break;
+
+case "MYSQL":
+ define('SS_DATABASE_CLASS', 'MySQLDatabase');
+ define('SS_DATABASE_USERNAME', 'root');
+ define('SS_DATABASE_PASSWORD', '');
+ break;
+
+default:
+ define('SS_DATABASE_CLASS', 'SQLitePDODatabase');
+ define('SS_DATABASE_USERNAME', 'root');
+ define('SS_DATABASE_PASSWORD', '');
+}
+
+echo SS_DATABASE_CLASS;
+
define('SS_DATABASE_SERVER', 'localhost');
-define('SS_DATABASE_USERNAME', 'root');
-define('SS_DATABASE_PASSWORD', '');
define('SS_DATABASE_CHOOSE_NAME', true);
+
/* Configure a default username and password to access the CMS on all sites in this environment. */
define('SS_DEFAULT_ADMIN_USERNAME', 'username');
define('SS_DEFAULT_ADMIN_PASSWORD', 'password');
1  tests/travis/before_script
View
@@ -1,6 +1,7 @@
BUILD_DIR=$1
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
+git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-postgresql.git $BUILD_DIR/postgresql
cp ./tests/travis/_ss_environment.php $BUILD_DIR
cp ./tests/travis/_config.php $BUILD_DIR/mysite
cp -r . $BUILD_DIR/framework
Please sign in to comment.
Something went wrong with that request. Please try again.