diff --git a/.travis.yml b/.travis.yml index 87b564b126..dba87f0f56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,21 +2,25 @@ language: node_js node_js: '6' script: - npm run build - - npm run travis + - travis_retry npm run travis sudo: false cache: directories: - node_modules +addons: + sauce_connect: + username: "quill" + access_key: "adc0c0cf-221b-46f1-81b9-a4429b722c2e" env: matrix: - - CXX=g++-4.8 BROWSER=mac-chrome-latest - - CXX=g++-4.8 BROWSER=mac-firefox-latest - - CXX=g++-4.8 BROWSER=mac-safari-latest - - CXX=g++-4.8 BROWSER=windows-chrome-latest - - CXX=g++-4.8 BROWSER=windows-firefox-latest - - CXX=g++-4.8 BROWSER=windows-edge-latest - - CXX=g++-4.8 BROWSER=windows-ie-latest - - CXX=g++-4.8 BROWSER=linux-chrome-latest - - CXX=g++-4.8 BROWSER=linux-firefox-latest - - CXX=g++-4.8 BROWSER=ios-latest - - CXX=g++-4.8 BROWSER=android-latest + - BROWSER=mac-chrome-latest + - BROWSER=mac-firefox-latest + - BROWSER=mac-safari-latest + - BROWSER=windows-chrome-latest + - BROWSER=windows-firefox-latest + - BROWSER=windows-edge-latest + - BROWSER=windows-ie-latest + - BROWSER=linux-chrome-latest + - BROWSER=linux-firefox-latest + - BROWSER=ios-latest + - BROWSER=android-latest diff --git a/_develop/browsers.js b/_develop/browsers.js index 0637ee884e..3f56d9637b 100644 --- a/_develop/browsers.js +++ b/_develop/browsers.js @@ -22,7 +22,7 @@ var desktop = { var mobile = { 'ios-latest' : ['iPhone 7 Plus', 'iOS', '10.0', 'Safari'], - 'ios-previous' : ['iPhone 7 Plus', 'iOS', '9.3', 'Safari'], + 'ios-previous' : ['iPhone 6 Plus', 'iOS', '9.3', 'Safari'], 'android-latest' : ['Android Emulator', 'Android', '5.1', 'Browser'], 'android-previous' : ['Android Emulator', 'Android', '5.0', 'Browser'] @@ -38,10 +38,11 @@ Object.keys(desktop).forEach(function(key) { }); Object.keys(mobile).forEach(function(key) { + var appiumVersion = key.startsWith('ios') ? '1.6.1' : '1.5.3'; module.exports[key] = { base: 'SauceLabs', browserName: mobile[key][3], - appiumVersion: '1.6.1', + appiumVersion: appiumVersion, deviceName: mobile[key][0], deviceOrientation: 'portrait', platformVersion: mobile[key][2], diff --git a/_develop/karma.config.js b/_develop/karma.config.js index d003c14b1d..1bd0fcbd4b 100644 --- a/_develop/karma.config.js +++ b/_develop/karma.config.js @@ -50,7 +50,9 @@ module.exports = function(config) { }, customLaunchers: browsers }); + if (process.env.TRAVIS) { + config.sauceLabs.startConnect = false; config.transports = ['polling']; config.browsers = [process.env.BROWSER]; config.browserDisconnectTimeout = 10000; @@ -58,7 +60,9 @@ module.exports = function(config) { config.browserNoActivityTimeout = 60000; config.captureTimeout = 120000; // MS Edge does not work in an iframe - if (['ios-latest', 'android-latest'].indexOf(process.env.BROWSER) > -1) { + if (process.env.BROWSER.indexOf('ios') > -1 || + process.env.BROWSER.indexOf('android') > -1 || + process.env.BROWSER.indexOf('firefox') > -1) { config.client.useIframe = true; } } diff --git a/_develop/sauce.js b/_develop/sauce.js index b6199cd590..bad1fdc055 100644 --- a/_develop/sauce.js +++ b/_develop/sauce.js @@ -7,12 +7,14 @@ var options = { }; if (process.env.TRAVIS) { - options.build = process.env.TRAVIS_BUILD_ID; - options.tunnel = process.env.TRAVIS_JOB_NUMBER; + module.exports = { + build: process.env.TRAVIS_BUILD_ID, + tunnel: process.env.TRAVIS_JOB_NUMBER + }; } else { var id = _.random(16*16*16*16).toString(16); - options.build = os.hostname() + '-' + id; - options.tunnel = os.hostname() + '-tunnel-' + id; + module.exports = { + build: os.hostname() + '-' + id, + tunnel: os.hostname() + '-tunnel-' + id + }; } - -module.exports = options;