]> source.dussan.org Git - jquery.git/commitdiff
Build: Run tests on Travis on FirefoxHeadless as well
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 21 Oct 2019 17:06:39 +0000 (19:06 +0200)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Tue, 22 Oct 2019 18:07:56 +0000 (20:07 +0200)
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.

(cherry-picked from 84835e68239ce55d1fc007b284e8ef4ed2817c2)

.travis.yml
Gruntfile.js

index 10cef4a65f06da3ac86e9e89d89ecb9d1804796b..97d54454f5b71abb0eb20779c56a3581a84fb10a 100644 (file)
@@ -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
index 8458a6772b03ec1fc514719a5dfa39584687d901..35d7f941341fb61b478714b386d3da654f47df2d 100644 (file)
@@ -14,7 +14,6 @@ module.exports = function( grunt ) {
 
        var fs = require( "fs" ),
                gzip = require( "gzip-js" ),
-               isTravis = process.env.TRAVIS,
                oldNode = /^v6\./.test( process.version );
 
        // Support: Node.js <8
@@ -223,9 +222,7 @@ module.exports = function( grunt ) {
                                singleRun: true
                        },
                        main: {
-
-                               // The Chrome sandbox doesn't work on Travis.
-                               browsers: [ isTravis ? "ChromeHeadlessNoSandbox" : "ChromeHeadless" ]
+                               browsers: [ "ChromeHeadless", "FirefoxHeadless" ]
                        },
 
                        jsdom: {