Skip to content

Commit b85d32d

Browse files
travis-ci run chrome headless with --no-sandbox
1 parent 0f597cf commit b85d32d

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ before_script:
55
- npm install
66
- npm run build
77
script:
8-
- npm test
8+
- npm run test-travis

karma.conf.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,21 @@ module.exports = function(config) {
2525
karmaTypescriptConfig: {
2626
tsconfig: 'tsconfig.test.json'
2727
},
28-
browsers: [
29-
'Chrome',
30-
//'Firefox'
31-
],
28+
browsers: process.env.KARMA_BROWSERS
29+
? process.env.KARMA_BROWSERS.split(',')
30+
: ['Chrome'],
3231
browserNoActivityTimeout: 60000,
3332
captureTimeout: 60000,
3433
client: {
3534
jasmine: {
3635
timeoutInterval: 60000
3736
}
37+
},
38+
customLaunchers: {
39+
ChromeHeadlessNoSandbox: {
40+
base: 'ChromeHeadless',
41+
flags: ['--no-sandbox']
42+
}
3843
}
3944
})
4045
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"rollup-min": "rollup -c rollup.config.js --environment minify:true",
99
"rollup": "rollup -c rollup.config.js",
1010
"build": "npm run rollup && npm run rollup-min && tsc",
11-
"test": "karma start"
11+
"test": "karma start",
12+
"test-travis": "set KARMA_BROWSERS=ChromeHeadlessNoSandbox&& karma start"
1213
},
1314
"keywords": [
1415
"face",

0 commit comments

Comments
 (0)