Skip to content

Commit

Permalink
[chore] Update zuul config to speed up tests (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne authored Dec 23, 2016
1 parent 70262f0 commit 1e23230
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 40 deletions.
34 changes: 2 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,5 @@ notifications:
irc: "irc.freenode.org#socket.io"
matrix:
include:
- node_js: '0.10'
env: BROWSER_NAME=chrome BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=latest
- node_js: '0.12'
env: BROWSER_NAME=firefox BROWSER_VERSION=latest BROWSER_PLATFORM="Windows 10"
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=6
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=7
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=8
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=9
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=10 BROWSER_PLATFORM="Windows 2012"
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=latest BROWSER_PLATFORM="Windows 2012"
# - node_js: '0.12'
# env: BROWSER_NAME=microsoftedge BROWSER_VERSION=13 BROWSER_PLATFORM="Windows 10"
- node_js: '0.10'
env: BROWSER_NAME=iphone BROWSER_VERSION=8.4
- node_js: '0.12'
env: BROWSER_NAME=iphone BROWSER_VERSION=9.2
- node_js: '0.10'
env: BROWSER_NAME=android BROWSER_VERSION=4.3
- node_js: '0.10'
env: BROWSER_NAME=android BROWSER_VERSION=4.4
- node_js: '0.12'
env: BROWSER_NAME=android BROWSER_VERSION=5.1
- node_js: '0.12'
env: BROWSER_NAME=android BROWSER_VERSION=latest
- node_js: 'node'
env: BROWSERS=1
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"concat-stream": "1.4.6",
"del": "2.2.0",
"derequire": "1.2.0",
"engine.io": "1.8.2",
"eslint-config-standard": "4.4.0",
"eslint-plugin-standard": "1.3.1",
"engine.io": "1.8.2",
"expect.js": "0.2.0",
"express": "3.4.8",
"gulp": "3.9.0",
Expand All @@ -58,6 +58,7 @@
"gulp-task-listing": "1.0.1",
"istanbul": "0.2.3",
"mocha": "1.16.2",
"socket.io-browsers": "^1.0.0",
"webpack": "1.12.12",
"webpack-stream": "3.1.0",
"zuul": "3.11.0",
Expand Down
34 changes: 27 additions & 7 deletions zuul.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
'use strict';

module.exports = {
var browsers = require('socket.io-browsers');

var zuulConfig = module.exports = {
ui: 'mocha-bdd',
server: './test/support/server.js',
tunnel: {
type: 'ngrok',
authtoken: '6Aw8vTgcG5EvXdQywVvbh_3fMxvd4Q7dcL2caAHAFjV',
proto: 'tcp'
},
builder: 'zuul-builder-webpack',
webpack: require('./support/webpack.config.js')
webpack: require('./support/webpack.config.js'),

// test on localhost by default
local: true,

concurrency: 2, // ngrok only accepts two tunnels by default
// if browser does not sends output in 120s since last output:
// stop testing, something is wrong
browser_output_timeout: 120 * 1000,
browser_open_timeout: 60 * 4 * 1000,
// we want to be notified something is wrong asap, so no retry
browser_retries: 1
};

if (process.env.CI === 'true') {
zuulConfig.local = false;
zuulConfig.tunnel = {
type: 'ngrok',
bind_tls: true
};
}

var isPullRequest = process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST !== 'false';
zuulConfig.browsers = isPullRequest ? browsers.pullRequest : browsers.all;

0 comments on commit 1e23230

Please sign in to comment.