Run tests on Sauce

This commit is contained in:
Tim Schaub
2017-08-16 14:55:48 -04:00
parent 5d0b1efba7
commit 1fdef48812
2 changed files with 51 additions and 20 deletions

View File

@@ -1,26 +1,20 @@
sudo: false
sudo: required
language: node_js
node_js:
- "8"
addons:
firefox: "52.0"
- '8'
cache:
directories:
- node_modules
- node_modules
env:
- DISPLAY=:99.0
- DISPLAY=:99.0
before_script:
- "rm src/ol/renderer/webgl/*shader.js"
- "sh -e /etc/init.d/xvfb start"
- "npm ls || true"
script: "make ci"
- rm src/ol/renderer/webgl/*shader.js
script: make ci
branches:
only:
- master
- master
addons:
sauce_connect:
username: openlayers
jwt:
secure: bb2Ibzu9RLe6ZlIG7JVcuH7IoLMxa/i3LTM7t8mbsPjVOGs5ycyJ7M9MbvqB/F2EzbeV4XB2c9ufI4TkaLYceY5kdWjfZVN8iasr+GFqKMv1uR4i6bpu8KmHJ+blxwfY1QOQ/cGwEx+fbeycMtpTc3Y3GyXaPlCQLhbZvesMg88=

View File

@@ -1,4 +1,5 @@
var path = require('path');
var pkg = require('../package.json');
/**
* The config below is not enough to run Karma. In addition, we need to add
@@ -47,9 +48,45 @@ module.exports = function(karma) {
});
if (process.env.TRAVIS) {
// see https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
// for platform and browserName options (Selenium API, node.js code)
var customLaunchers = {
SL_Chrome: {
base: 'SauceLabs',
browserName: 'chrome'
},
SL_Firefox: {
base: 'SauceLabs',
browserName: 'firefox'
},
SL_Edge: {
base: 'SauceLabs',
platform: 'Windows 10',
browserName: 'MicrosoftEdge'
},
SL_Safari: {
base: 'SauceLabs',
platform: 'macos 10.12',
browserName: 'safari'
}
};
karma.set({
reporters: ['dots'],
browsers: ['Firefox']
sauceLabs: {
testName: pkg.name + '@' + pkg.version,
recordScreenshots: false,
connectOptions: {
port: 5757
},
startConnect: false,
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
username: 'openlayers',
accessKey: process.env.SAUCE_ACCESS_KEY
},
reporters: ['dots', 'saucelabs'],
captureTimeout: 240000,
browserNoActivityTimeout: 240000,
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers)
});
} else {
karma.set({