mirror of
https://github.com/videojs/video.js.git
synced 2025-04-11 11:42:08 +02:00
Added a base for running saucelabs tests from grunt. closes #1215
This commit is contained in:
parent
1378f566ab
commit
813f28fb4d
@ -10,6 +10,7 @@ CHANGELOG
|
||||
* Exposed the vertical option for slider controls ([view](https://github.com/videojs/video.js/pull/1303))
|
||||
* Fixed an error when disposing a tech using manual timeupdates ([view](https://github.com/videojs/video.js/pull/1312))
|
||||
* Exported missing Player API methods (remainingTime, supportsFullScreen, enterFullWindow, exitFullWindow, preload) ([view](https://github.com/videojs/video.js/pull/1328))
|
||||
* Added a base for running saucelabs tests from grunt ([view](https://github.com/videojs/video.js/pull/1215))
|
||||
|
||||
--------------------
|
||||
|
||||
|
25
Gruntfile.js
25
Gruntfile.js
@ -1,9 +1,10 @@
|
||||
module.exports = function(grunt) {
|
||||
var pkg, s3, semver, version, verParts, uglify;
|
||||
var pkg, s3, semver, version, verParts, uglify, exec;
|
||||
|
||||
semver = require('semver');
|
||||
pkg = grunt.file.readJSON('package.json');
|
||||
uglify = require('uglify-js');
|
||||
exec = require('child_process').exec;
|
||||
|
||||
try {
|
||||
s3 = grunt.file.readJSON('.s3config.json');
|
||||
@ -373,6 +374,28 @@ module.exports = function(grunt) {
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask('saucelabs', function() {
|
||||
var done = this.async();
|
||||
|
||||
if (this.args[0] == 'connect') {
|
||||
exec('curl https://gist.githubusercontent.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash',
|
||||
function(error, stdout, stderr) {
|
||||
if (error) {
|
||||
grunt.log.error(error);
|
||||
return done();
|
||||
}
|
||||
|
||||
grunt.verbose.error(stderr.toString());
|
||||
grunt.verbose.writeln(stdout.toString());
|
||||
grunt.task.run(['karma:saucelabs']);
|
||||
done();
|
||||
});
|
||||
} else {
|
||||
grunt.task.run(['karma:saucelabs']);
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
var fs = require('fs'),
|
||||
gzip = require('zlib').gzip;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user