diff options
| author | Vojta Jina | 2013-08-20 14:43:15 -0700 | 
|---|---|---|
| committer | Vojta Jina | 2013-08-23 16:49:10 -0700 | 
| commit | 7909ebedc2a098f041dd2d3835e7297392bfdb7d (patch) | |
| tree | 92d16a01e9df2d437bbfc79ccc38099936833fbe | |
| parent | 1d06a943857719ef533ca374c05aa5e02089a4d9 (diff) | |
| download | angular.js-7909ebedc2a098f041dd2d3835e7297392bfdb7d.tar.bz2 | |
chore: run more browsers on Travis (IE8,IE9,IE10,Safari,FF)
Also instead of running everything in parallel, there are only two parallel tasks:
- e2e tests running in the background (only on Chrome)
- all the unit tests running sequentially
| -rw-r--r-- | Gruntfile.js | 11 | ||||
| -rw-r--r-- | karma-shared.conf.js | 28 | ||||
| -rw-r--r-- | lib/grunt/utils.js | 17 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rwxr-xr-x | travis_build.sh | 5 | 
5 files changed, 47 insertions, 16 deletions
| diff --git a/Gruntfile.js b/Gruntfile.js index daf5f24e..625ab7a3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -27,16 +27,9 @@ module.exports = function(grunt) {      parallel: {        travis: { -        options: { -          stream: true -        },          tasks: [ -          {grunt: true, args: ['test:docgen']}, -          util.parallelTask('tests:docs'), -          util.parallelTask('tests:modules'), -          util.parallelTask('tests:jquery'), -          util.parallelTask('tests:jqlite'), -          util.parallelTask('test:e2e') +          util.parallelTask(['test:unit', 'test:docgen', 'tests:docs'], {stream: true}), +          util.parallelTask(['test:e2e'])          ]        }      }, diff --git a/karma-shared.conf.js b/karma-shared.conf.js index 81476708..727720a4 100644 --- a/karma-shared.conf.js +++ b/karma-shared.conf.js @@ -18,6 +18,34 @@ module.exports = function(config) {        'SL_Chrome': {          base: 'SauceLabs',          browserName: 'chrome' +      }, +      'SL_Firefox': { +        base: 'SauceLabs', +        browserName: 'firefox' +      }, +      'SL_Safari': { +        base: 'SauceLabs', +        browserName: 'safari', +        platform: 'Mac 10.8', +        version: '6' +      }, +      'SL_IE_8': { +        base: 'SauceLabs', +        browserName: 'internet explorer', +        platform: 'Windows 7', +        version: '8' +      }, +      'SL_IE_9': { +        base: 'SauceLabs', +        browserName: 'internet explorer', +        platform: 'Windows 2008', +        version: '9' +      }, +      'SL_IE_10': { +        base: 'SauceLabs', +        browserName: 'internet explorer', +        platform: 'Windows 2012', +        version: '10'        }      }    }); diff --git a/lib/grunt/utils.js b/lib/grunt/utils.js index 97e7c416..ed61a181 100644 --- a/lib/grunt/utils.js +++ b/lib/grunt/utils.js @@ -246,10 +246,18 @@ module.exports = {      };    }, -  parallelTask: function(name) { -    var args = [name, '--port=' + this.lastParallelTaskPort]; +  parallelTask: function(args, options) { +    var task = { +      grunt: true, +      args: args, +      stream: options && options.stream +    }; + +    args.push('--port=' + this.lastParallelTaskPort); -    if (grunt.option('browsers')) { +    if (args.indexOf('test:e2e') !== -1 && grunt.option('e2e-browsers')) { +      args.push('--browsers=' + grunt.option('e2e-browsers')); +    } else if (grunt.option('browsers')) {        args.push('--browsers=' + grunt.option('browsers'));      } @@ -259,8 +267,7 @@ module.exports = {      this.lastParallelTaskPort++; - -    return {grunt: true, args: args}; +    return task;    },    lastParallelTaskPort: 9876 diff --git a/package.json b/package.json index f49fb738..1d43cb99 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@      "marked": "~0.2.9",      "rewire": "1.1.3",      "grunt-contrib-jasmine-node": "~0.1.1", -    "grunt-parallel": "~0.3.0", +    "grunt-parallel": "git://github.com/vojtajina/grunt-parallel.git#streaming-per-task",      "grunt-ddescribe-iit": "~0.0.1",      "grunt-merge-conflict": "~0.0.1"    }, diff --git a/travis_build.sh b/travis_build.sh index e2f28e20..627ece06 100755 --- a/travis_build.sh +++ b/travis_build.sh @@ -7,4 +7,7 @@ export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`  npm install -g grunt-cli  grunt ci-checks package  ./lib/sauce/sauce_connect_block.sh -grunt parallel:travis --reporters dots --browsers SL_Chrome + +grunt parallel:travis --reporters dots \ +  --browsers SL_Chrome,SL_Firefox,SL_Safari,SL_IE_8,SL_IE_9,SL_IE_10 \ +  --e2e-browsers SL_Chrome | 
