From 4893c5b304e18e1077669d80f4fd4f8c38925497 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 3 Jan 2016 17:53:10 +0100 Subject: [PATCH] configure Travis continuous integration It will run gulp karma:single , and fail if that fails. --- .travis.yml | 6 ++++++ karma.conf.js | 10 ++++++++-- package.json | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..589afdf --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "4.1" +before_script: + - npm install -g gulp +script: gulp karma:single diff --git a/karma.conf.js b/karma.conf.js index 81932f2..5612937 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -5,7 +5,13 @@ module.exports = function(karma) { var globs = _.flatten([ config.globs.js, config.globs.spec - ]); + ]), + browser = 'Chrome'; + + if (process.env.TRAVIS) { + globs.unshift('node_modules/babel-polyfill/dist/polyfill.js'); + browser = 'PhantomJS'; + } karma.set({ frameworks: ['browserify', 'jasmine'], @@ -17,7 +23,7 @@ module.exports = function(karma) { reporters: ['progress', 'notify'], colors: true, logLevel: karma.LOG_INFO, - browsers: ['Chrome'], + browsers: [browser], autoWatch: true, singleRun: false, browserify: _.extend({ diff --git a/package.json b/package.json index 77950fc..8ab31e1 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "karma-chrome-launcher": "^0.2.2", "karma-jasmine": "^0.3.1", "karma-notify-reporter": "^0.1.1", + "karma-phantomjs-launcher": "^0.2.2", "lodash": "^3.10.1", "node-bourbon": "^4.2.3", "snapsvg": "^0.4.0",