Skip to content

Commit

Permalink
Merge pull request #1025 from Esri/phantomless
Browse files Browse the repository at this point in the history
use Chrome for CI tests instead of phantomjs
  • Loading branch information
jgravois authored Nov 29, 2017
2 parents 808e67d + 14e03b6 commit 673df5a
Show file tree
Hide file tree
Showing 8 changed files with 1,191 additions and 1,017 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ node_js:
cache:
directories: # Cache dependencies
- node_modules
- travis_phantomjs
before_script:
- npm prune
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
before_install:
- npm i -g npm@latest
- google-chrome-stable --headless --disable-gpu
addons:
chrome: stable
29 changes: 16 additions & 13 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Generated on Fri May 30 2014 15:44:45 GMT-0400 (EDT)

module.exports = function (config) {
config.set({
var configuration = {

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
Expand Down Expand Up @@ -54,22 +54,19 @@ module.exports = function (config) {
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: [
// 'Chrome',
'Chrome'
// 'ChromeCanary',
// 'Firefox',
// 'Safari',
'PhantomJS'
// 'PhantomJS'
],

// See https://github.com/karma-runner/karma-phantomjs-launcher/issues/74
// customLaunchers: {
// PhantomJS_CORS: {
// base: 'PhantomJS',
// flags: [
// '--web-security=false'
// ]
// }
// },
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
Expand All @@ -92,5 +89,11 @@ module.exports = function (config) {
}
]
}
});
};

if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci'];
}

config.set(configuration);
};
Loading

0 comments on commit 673df5a

Please sign in to comment.