Skip to content

Commit 1e23230

Browse files
[chore] Update zuul config to speed up tests (#526)
1 parent 70262f0 commit 1e23230

File tree

3 files changed

+31
-40
lines changed

3 files changed

+31
-40
lines changed

.travis.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,5 @@ notifications:
1111
irc: "irc.freenode.org#socket.io"
1212
matrix:
1313
include:
14-
- node_js: '0.10'
15-
env: BROWSER_NAME=chrome BROWSER_VERSION=latest
16-
- node_js: '0.10'
17-
env: BROWSER_NAME=safari BROWSER_VERSION=latest
18-
- node_js: '0.12'
19-
env: BROWSER_NAME=firefox BROWSER_VERSION=latest BROWSER_PLATFORM="Windows 10"
20-
- node_js: '0.10'
21-
env: BROWSER_NAME=ie BROWSER_VERSION=6
22-
- node_js: '0.10'
23-
env: BROWSER_NAME=ie BROWSER_VERSION=7
24-
- node_js: '0.10'
25-
env: BROWSER_NAME=ie BROWSER_VERSION=8
26-
- node_js: '0.10'
27-
env: BROWSER_NAME=ie BROWSER_VERSION=9
28-
- node_js: '0.10'
29-
env: BROWSER_NAME=ie BROWSER_VERSION=10 BROWSER_PLATFORM="Windows 2012"
30-
- node_js: '0.10'
31-
env: BROWSER_NAME=ie BROWSER_VERSION=latest BROWSER_PLATFORM="Windows 2012"
32-
# - node_js: '0.12'
33-
# env: BROWSER_NAME=microsoftedge BROWSER_VERSION=13 BROWSER_PLATFORM="Windows 10"
34-
- node_js: '0.10'
35-
env: BROWSER_NAME=iphone BROWSER_VERSION=8.4
36-
- node_js: '0.12'
37-
env: BROWSER_NAME=iphone BROWSER_VERSION=9.2
38-
- node_js: '0.10'
39-
env: BROWSER_NAME=android BROWSER_VERSION=4.3
40-
- node_js: '0.10'
41-
env: BROWSER_NAME=android BROWSER_VERSION=4.4
42-
- node_js: '0.12'
43-
env: BROWSER_NAME=android BROWSER_VERSION=5.1
44-
- node_js: '0.12'
45-
env: BROWSER_NAME=android BROWSER_VERSION=latest
14+
- node_js: 'node'
15+
env: BROWSERS=1

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
"concat-stream": "1.4.6",
4646
"del": "2.2.0",
4747
"derequire": "1.2.0",
48+
"engine.io": "1.8.2",
4849
"eslint-config-standard": "4.4.0",
4950
"eslint-plugin-standard": "1.3.1",
50-
"engine.io": "1.8.2",
5151
"expect.js": "0.2.0",
5252
"express": "3.4.8",
5353
"gulp": "3.9.0",
@@ -58,6 +58,7 @@
5858
"gulp-task-listing": "1.0.1",
5959
"istanbul": "0.2.3",
6060
"mocha": "1.16.2",
61+
"socket.io-browsers": "^1.0.0",
6162
"webpack": "1.12.12",
6263
"webpack-stream": "3.1.0",
6364
"zuul": "3.11.0",

zuul.config.js

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
1+
'use strict';
12

2-
module.exports = {
3+
var browsers = require('socket.io-browsers');
4+
5+
var zuulConfig = module.exports = {
36
ui: 'mocha-bdd',
47
server: './test/support/server.js',
5-
tunnel: {
6-
type: 'ngrok',
7-
authtoken: '6Aw8vTgcG5EvXdQywVvbh_3fMxvd4Q7dcL2caAHAFjV',
8-
proto: 'tcp'
9-
},
108
builder: 'zuul-builder-webpack',
11-
webpack: require('./support/webpack.config.js')
9+
webpack: require('./support/webpack.config.js'),
10+
11+
// test on localhost by default
12+
local: true,
13+
14+
concurrency: 2, // ngrok only accepts two tunnels by default
15+
// if browser does not sends output in 120s since last output:
16+
// stop testing, something is wrong
17+
browser_output_timeout: 120 * 1000,
18+
browser_open_timeout: 60 * 4 * 1000,
19+
// we want to be notified something is wrong asap, so no retry
20+
browser_retries: 1
1221
};
22+
23+
if (process.env.CI === 'true') {
24+
zuulConfig.local = false;
25+
zuulConfig.tunnel = {
26+
type: 'ngrok',
27+
bind_tls: true
28+
};
29+
}
30+
31+
var isPullRequest = process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST !== 'false';
32+
zuulConfig.browsers = isPullRequest ? browsers.pullRequest : browsers.all;

0 commit comments

Comments
 (0)