Skip to content

Commit

Permalink
More travis stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Sinchok committed Oct 30, 2014
1 parent ddf21ca commit 8202796
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 33 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ before_install:
- npm install -g grunt-cli
- bower install
script:
- karma start
- grunt karma
after_script:
- grunt coveralls
addons:
sauce_connect: true
env:
Expand Down
54 changes: 23 additions & 31 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@ var gruntConfig = {
src: ['videojs.vast.js', specs],
},
},
jasmine: {
src: 'videojs.vast.js',
options: {
specs: specs,
helpers: helpers,
vendor: [
"http://vjs.zencdn.net/4.4.3/video.js",
"bower_components/videojs-contrib-ads/src/videojs.ads.js",
"lib/vast-client.js"
]
// jasmine: {
// src: 'videojs.vast.js',
// options: {
// specs: specs,
// helpers: helpers,
// vendor: [
// "http://vjs.zencdn.net/4.4.3/video.js",
// "bower_components/videojs-contrib-ads/src/videojs.ads.js",
// "lib/vast-client.js"
// ]
// }
// },
karma: {
unit: {
configFile: 'karma.conf.js'
}
},
simplemocha: {
sauce: {
options: {
timeout: 60000,
reporter: "spec"
},
src: ["spec/sauce-wd.js"]
coveralls: {
options: {
coverage_dir: './coverage',
force: true,
recursive: true
}
},
concurrent: {
"test-sauce": []
},
connect: {
server: {
options: {
Expand All @@ -58,30 +58,22 @@ var gruntConfig = {
}
};

_(desireds).each(function(desired, key) {
gruntConfig.env[key] = {
DESIRED: JSON.stringify(desired)
};
gruntConfig.concurrent['test-sauce'].push('test:sauce:' + key);
});

module.exports = function(grunt) {
grunt.initConfig(gruntConfig);

grunt.loadNpmTasks('grunt-env');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-karma-coveralls');
grunt.loadNpmTasks('grunt-karma');

grunt.registerTask('default', ['test:sauce:' + _(desireds).keys().first()]);

_(desireds).each(function(desired, key) {
grunt.registerTask('test:sauce:' + key, ['env:' + key, 'simplemocha:sauce']);
});

grunt.registerTask('default', ['jshint', 'jasmine', 'watch']);
grunt.registerTask('travis', ['jshint', 'jasmine', 'concurrent:test-sauce']);
grunt.registerTask('default', ['jshint', 'karma']);
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"karma-jasmine": "~0.2.0",
"karma-sauce-launcher": "~0.2.10",
"karma-phantomjs-launcher": "~0.1.4",
"grunt-karma-coveralls": "2.5.1",

"lodash": "~2.4.1",
"wd": "~0.2.12"
Expand Down
2 changes: 1 addition & 1 deletion videojs.vast.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,4 @@
};

vjs.plugin('vast', vastPlugin);
}(videojs, DMVAST));
}(window.videojs, window.DMVAST));

0 comments on commit 8202796

Please sign in to comment.