mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Updated Travis-CI configuration to have a 3 database build grid.
This commit is contained in:
parent
4cc82e906b
commit
866d9a94ee
@ -2,6 +2,11 @@ language: php
|
|||||||
php:
|
php:
|
||||||
- 5.3
|
- 5.3
|
||||||
|
|
||||||
|
env:
|
||||||
|
- TESTDB=SQLITE
|
||||||
|
- TESTDB=MYSQL
|
||||||
|
- TESTDB=PGSQL
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- ./tests/travis/before_script ~/builds/ss
|
- ./tests/travis/before_script ~/builds/ss
|
||||||
- cd ~/builds/ss
|
- cd ~/builds/ss
|
||||||
|
@ -3,13 +3,33 @@ ob_start();
|
|||||||
|
|
||||||
define('SS_ENVIRONMENT_TYPE', 'dev');
|
define('SS_ENVIRONMENT_TYPE', 'dev');
|
||||||
|
|
||||||
/* Database connection */
|
/* Database connection */
|
||||||
define('SS_DATABASE_CLASS', 'SQLitePDODatabase');
|
$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_SERVER', 'localhost');
|
||||||
define('SS_DATABASE_USERNAME', 'root');
|
|
||||||
define('SS_DATABASE_PASSWORD', '');
|
|
||||||
define('SS_DATABASE_CHOOSE_NAME', true);
|
define('SS_DATABASE_CHOOSE_NAME', true);
|
||||||
|
|
||||||
|
|
||||||
/* Configure a default username and password to access the CMS on all sites in this environment. */
|
/* 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_USERNAME', 'username');
|
||||||
define('SS_DEFAULT_ADMIN_PASSWORD', 'password');
|
define('SS_DEFAULT_ADMIN_PASSWORD', 'password');
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
BUILD_DIR=$1
|
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/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-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/_ss_environment.php $BUILD_DIR
|
||||||
cp ./tests/travis/_config.php $BUILD_DIR/mysite
|
cp ./tests/travis/_config.php $BUILD_DIR/mysite
|
||||||
cp -r . $BUILD_DIR/framework
|
cp -r . $BUILD_DIR/framework
|
||||||
|
Loading…
x
Reference in New Issue
Block a user