diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2018-03-19 18:12:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-19 18:12:23 +0100 |
commit | b95e0da68e1e3fce59a6a54c209b893f611b0b9c (patch) | |
tree | d46799cae524892200a333fb8a8fe5174ac1a51c /Gruntfile.js | |
parent | 365284240429d442c3fbe9f505c7b297425bc3a3 (diff) | |
download | jquery-b95e0da68e1e3fce59a6a54c209b893f611b0b9c.tar.gz jquery-b95e0da68e1e3fce59a6a54c209b893f611b0b9c.zip |
Build: Don't require sudo on Travis, use sandboxless headless Chrome
The Chrome sandbox doesn't work on Travis unless sudo is enabled. Instead,
we're disabling the Chrome sandbox.
Closes gh-4011
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index a0e907715..fbf9b5671 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,7 +13,8 @@ module.exports = function( grunt ) { } var fs = require( "fs" ), - gzip = require( "gzip-js" ); + gzip = require( "gzip-js" ), + isTravis = process.env.TRAVIS; if ( !grunt.option( "filename" ) ) { grunt.option( "filename", "jquery.js" ); @@ -151,6 +152,12 @@ module.exports = function( grunt ) { options: { customContextFile: "test/karma.context.html", customDebugFile: "test/karma.debug.html", + customLaunchers: { + ChromeHeadlessNoSandbox: { + base: "ChromeHeadless", + flags: [ "--no-sandbox" ] + } + }, frameworks: [ "qunit" ], middleware: [ "mockserver" ], plugins: [ @@ -214,7 +221,9 @@ module.exports = function( grunt ) { singleRun: true }, main: { - browsers: [ "ChromeHeadless" ] + + // The Chrome sandbox doesn't work on Travis. + browsers: [ isTravis ? "ChromeHeadlessNoSandbox" : "ChromeHeadless" ] }, // To debug tests with Karma: |