Skip to content

Commit

Permalink
Build: Run tests on Travis on FirefoxHeadless as well
Browse files Browse the repository at this point in the history
Also, run them on both ChromeHeadless & FirefoxHeadless locally on
`grunt karma:main`.

Plus, so far, the chrome addons were installed for all the jobs, even
the ones that weren't used for browser testing. Changing that makes
those jobs faster.

Closes gh-4524
  • Loading branch information
mgol committed Oct 21, 2019
1 parent 15750b0 commit 584835e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Expand Up @@ -4,14 +4,17 @@ node_js:
- "8"
- "10"
- "12"
addons:
chrome: stable
env:
- NPM_SCRIPT=test:browserless
matrix:
include:
# Run browser tests only on one Node.js version to save time.
- node_js: "10"
env: NPM_SCRIPT=test:browser
- node_js: "12"
env:
- NPM_SCRIPT="test:browser"
- BROWSERS="ChromeHeadless,FirefoxHeadless"
addons:
chrome: stable
firefox: latest
script:
- npm run $NPM_SCRIPT
7 changes: 2 additions & 5 deletions Gruntfile.js
Expand Up @@ -13,8 +13,7 @@ module.exports = function( grunt ) {
}

var fs = require( "fs" ),
gzip = require( "gzip-js" ),
isTravis = process.env.TRAVIS;
gzip = require( "gzip-js" );

if ( !grunt.option( "filename" ) ) {
grunt.option( "filename", "jquery.js" );
Expand Down Expand Up @@ -191,9 +190,7 @@ module.exports = function( grunt ) {
singleRun: true
},
main: {

// The Chrome sandbox doesn't work on Travis.
browsers: [ isTravis ? "ChromeHeadlessNoSandbox" : "ChromeHeadless" ]
browsers: [ "ChromeHeadless", "FirefoxHeadless" ]
},

jsdom: {
Expand Down

0 comments on commit 584835e

Please sign in to comment.