Run tests on MySQL and SQLite3.

fixes #921
This commit is contained in:
Fabian Becker 2013-10-29 20:54:37 +00:00 committed by Hannah Wolfe
parent 5df0acf37d
commit 3d42a3338f
3 changed files with 27 additions and 3 deletions

View File

@ -1,6 +1,9 @@
language: node_js
node_js:
- "0.10"
env:
- DB=sqlite3
- DB=mysql
git:
submodules: false
before_install:
@ -12,7 +15,8 @@ before_install:
- git checkout tags/1.1-beta1
- export PATH=$PATH:`pwd`/bin
- cd -
- if [ $DB == "mysql" ]; then mysql -e 'create database ghost_travis'; fi
before_script:
- phantomjs --version
- casperjs --version
- grunt init
- grunt init

View File

@ -498,7 +498,7 @@ var path = require('path'),
grunt.initConfig(cfg);
grunt.registerTask('setTestEnv', 'Use "testing" Ghost config; unless we are running on travis (then show queries for debugging)', function () {
process.env.NODE_ENV = process.env.TRAVIS ? 'travis' : 'testing';
process.env.NODE_ENV = process.env.TRAVIS ? 'travis-' + process.env.DB : 'testing';
});
grunt.registerTask('loadConfig', function () {

View File

@ -82,7 +82,7 @@ config = {
// ### Travis
// Automated testing run through GitHub
travis: {
'travis-sqlite3': {
url: 'http://127.0.0.1:2368',
database: {
client: 'sqlite3',
@ -94,6 +94,26 @@ config = {
host: '127.0.0.1',
port: '2368'
}
},
// ### Travis
// Automated testing run through GitHub
'travis-mysql': {
url: 'http://127.0.0.1:2368',
database: {
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'travis',
password : '',
database : 'ghost-travis',
charset : 'utf8'
}
},
server: {
host: '127.0.0.1',
port: '2368'
}
}
};