Test Chrome with CircleCI
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
/* eslint-env node, es6 */
|
||||
|
||||
const path = require('path');
|
||||
const pkg = require('../package.json');
|
||||
|
||||
module.exports = function(karma) {
|
||||
karma.set({
|
||||
@@ -57,7 +54,7 @@ module.exports = function(karma) {
|
||||
preprocessors: {
|
||||
'**/*.js': ['webpack', 'sourcemap']
|
||||
},
|
||||
reporters: ['progress'],
|
||||
reporters: ['dots'],
|
||||
webpack: {
|
||||
devtool: 'inline-source-map',
|
||||
mode: 'development',
|
||||
@@ -77,56 +74,9 @@ module.exports = function(karma) {
|
||||
}
|
||||
});
|
||||
|
||||
if (process.env.TRAVIS) {
|
||||
const testName = process.env.TRAVIS_PULL_REQUEST ?
|
||||
`https://github.com/openlayers/openlayers/pull/${process.env.TRAVIS_PULL_REQUEST}` :
|
||||
`${pkg.name}@${pkg.version} (${process.env.TRAVIS_COMMIT})`;
|
||||
|
||||
// see https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
|
||||
// for platform and browserName options (Selenium API, node.js code)
|
||||
const customLaunchers = {
|
||||
SL_Chrome: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'chrome',
|
||||
version: '62.0'
|
||||
},
|
||||
SL_Firefox: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'firefox',
|
||||
version: '58'
|
||||
},
|
||||
SL_Edge: {
|
||||
base: 'SauceLabs',
|
||||
platform: 'Windows 10',
|
||||
browserName: 'MicrosoftEdge'
|
||||
},
|
||||
SL_Safari: {
|
||||
base: 'SauceLabs',
|
||||
platform: 'macOS 10.12',
|
||||
browserName: 'safari'
|
||||
}
|
||||
};
|
||||
if (process.env.CIRCLECI) {
|
||||
karma.set({
|
||||
sauceLabs: {
|
||||
testName: testName,
|
||||
recordScreenshots: false,
|
||||
startConnect: true,
|
||||
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
|
||||
username: 'openlayers',
|
||||
accessKey: process.env.SAUCE_ACCESS_KEY,
|
||||
connectOptions: {
|
||||
noSslBumpDomains: 'all',
|
||||
connectRetries: 5
|
||||
}
|
||||
},
|
||||
hostname: 'travis.dev',
|
||||
reporters: ['dots', 'saucelabs'],
|
||||
browserDisconnectTimeout: 10000,
|
||||
browserDisconnectTolerance: 1,
|
||||
captureTimeout: 240000,
|
||||
browserNoActivityTimeout: 240000,
|
||||
customLaunchers: customLaunchers,
|
||||
browsers: Object.keys(customLaunchers),
|
||||
browsers: ['Chrome'],
|
||||
preprocessors: {
|
||||
'../src/**/*.js': ['coverage']
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user