configure Travis continuous integration

It will run gulp karma:single , and fail if that fails.
This commit is contained in:
Sebastian Thiel 2016-01-03 17:53:10 +01:00
parent 98d2f94a3a
commit 4893c5b304
3 changed files with 15 additions and 2 deletions

6
.travis.yml Normal file
View File

@ -0,0 +1,6 @@
language: node_js
node_js:
- "4.1"
before_script:
- npm install -g gulp
script: gulp karma:single

View File

@ -5,7 +5,13 @@ module.exports = function(karma) {
var globs = _.flatten([ var globs = _.flatten([
config.globs.js, config.globs.js,
config.globs.spec config.globs.spec
]); ]),
browser = 'Chrome';
if (process.env.TRAVIS) {
globs.unshift('node_modules/babel-polyfill/dist/polyfill.js');
browser = 'PhantomJS';
}
karma.set({ karma.set({
frameworks: ['browserify', 'jasmine'], frameworks: ['browserify', 'jasmine'],
@ -17,7 +23,7 @@ module.exports = function(karma) {
reporters: ['progress', 'notify'], reporters: ['progress', 'notify'],
colors: true, colors: true,
logLevel: karma.LOG_INFO, logLevel: karma.LOG_INFO,
browsers: ['Chrome'], browsers: [browser],
autoWatch: true, autoWatch: true,
singleRun: false, singleRun: false,
browserify: _.extend({ browserify: _.extend({

View File

@ -36,6 +36,7 @@
"karma-chrome-launcher": "^0.2.2", "karma-chrome-launcher": "^0.2.2",
"karma-jasmine": "^0.3.1", "karma-jasmine": "^0.3.1",
"karma-notify-reporter": "^0.1.1", "karma-notify-reporter": "^0.1.1",
"karma-phantomjs-launcher": "^0.2.2",
"lodash": "^3.10.1", "lodash": "^3.10.1",
"node-bourbon": "^4.2.3", "node-bourbon": "^4.2.3",
"snapsvg": "^0.4.0", "snapsvg": "^0.4.0",