mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge pull request #1343 from halfdan/921-mysql-build
This commit is contained in:
commit
02eed81cdf
9 changed files with 43 additions and 13 deletions
|
@ -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
|
||||
|
|
10
Gruntfile.js
10
Gruntfile.js
|
@ -237,6 +237,10 @@ var path = require('path'),
|
|||
'core/test/unit/**/export_spec.js',
|
||||
'core/test/unit/**/import_spec.js'
|
||||
]
|
||||
},
|
||||
|
||||
integration: {
|
||||
src: ['core/test/integration/**/model*_spec.js']
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -498,7 +502,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 () {
|
||||
|
@ -865,9 +869,11 @@ var path = require('path'),
|
|||
|
||||
grunt.registerTask('test-unit', 'Run unit tests', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'mochacli:all']);
|
||||
|
||||
grunt.registerTask('test-integration', 'Run integration tests', ['clean:test', 'setTestEnv', 'loadConfig', 'express:test', 'mochacli:integration']);
|
||||
|
||||
grunt.registerTask('test-functional', 'Run casperjs tests only', ['clean:test', 'setTestEnv', 'express:test', 'spawn-casperjs']);
|
||||
|
||||
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-functional']);
|
||||
grunt.registerTask('validate', 'Run tests and lint code', ['jslint', 'test-unit', 'test-integration', 'test-functional']);
|
||||
|
||||
grunt.registerTask('docs', 'Generate Docs', ['groc']);
|
||||
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
var testUtils = require('./testUtils'),
|
||||
var testUtils = require('../unit/testUtils'),
|
||||
should = require('should'),
|
||||
errors = require('../../server/errorHandling'),
|
||||
|
||||
|
@ -97,4 +97,4 @@ describe("Permission Model", function () {
|
|||
done();
|
||||
}).then(null, done);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('./testUtils'),
|
||||
var testUtils = require('../unit/testUtils'),
|
||||
should = require('should'),
|
||||
_ = require('underscore'),
|
||||
when = require('when'),
|
|
@ -1,5 +1,5 @@
|
|||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
var testUtils = require('./testUtils'),
|
||||
var testUtils = require('../unit/testUtils'),
|
||||
should = require('should'),
|
||||
errors = require('../../server/errorHandling'),
|
||||
|
||||
|
@ -97,4 +97,4 @@ describe("Role Model", function () {
|
|||
done();
|
||||
}).then(null, done);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var testUtils = require('./testUtils'),
|
||||
var testUtils = require('../unit/testUtils'),
|
||||
should = require('should'),
|
||||
_ = require("underscore"),
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('./testUtils'),
|
||||
var testUtils = require('../unit/testUtils'),
|
||||
_ = require("underscore"),
|
||||
when = require('when'),
|
||||
sequence = require('when/sequence'),
|
|
@ -1,5 +1,5 @@
|
|||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var testUtils = require('./testUtils'),
|
||||
var testUtils = require('../unit/testUtils'),
|
||||
should = require('should'),
|
||||
when = require('when'),
|
||||
_ = require('underscore'),
|
||||
|
@ -174,4 +174,4 @@ describe('User Model', function run() {
|
|||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue