This repository has been archived by the owner on Jan 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(travis, node): cleanup browser providers (#157)
* Cleans the browser-providers and the karma configuration * Removes unused dependencies (more coming in a follow-up) * Travis now runs against Node LTS * Fixes duplicate property in tsconfig
- Loading branch information
1 parent
8335bb5
commit aaeb525
Showing
11 changed files
with
439 additions
and
546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
'use strict'; | ||
|
||
/* | ||
* Browser Configuration for the different jobs in the CI. | ||
* Target can be either: BS (Browserstack) | SL (Saucelabs) | null (To not run at all) | ||
*/ | ||
const browserConfig = { | ||
'Chrome': { unitTest: {target: 'SL', required: true }}, | ||
'Firefox': { unitTest: {target: 'SL', required: true }}, | ||
'ChromeBeta': { unitTest: {target: null, required: false }}, | ||
'FirefoxBeta': { unitTest: {target: null, required: false }}, | ||
'ChromeDev': { unitTest: {target: null, required: true }}, | ||
'FirefoxDev': { unitTest: {target: null, required: true }}, | ||
'IE9': { unitTest: {target: null, required: false }}, | ||
'IE10': { unitTest: {target: null, required: true }}, | ||
'IE11': { unitTest: {target: 'BS', required: true }}, | ||
'Edge': { unitTest: {target: 'BS', required: true }}, | ||
'Android4.1': { unitTest: {target: null, required: false }}, | ||
'Android4.2': { unitTest: {target: null, required: false }}, | ||
'Android4.3': { unitTest: {target: null, required: false }}, | ||
'Android4.4': { unitTest: {target: null, required: false }}, | ||
'Android5': { unitTest: {target: 'SL', required: false }}, | ||
'Safari7': { unitTest: {target: null, required: false }}, | ||
'Safari8': { unitTest: {target: null, required: false }}, | ||
'Safari9': { unitTest: {target: 'BS', required: false }}, | ||
'Safari10': { unitTest: {target: 'BS', required: false }}, | ||
'iOS7': { unitTest: {target: null, required: false }}, | ||
'iOS8': { unitTest: {target: null, required: false }}, | ||
'iOS9': { unitTest: {target: 'SL', required: false }}, | ||
'WindowsPhone': { unitTest: {target: 'BS', required: false }} | ||
}; | ||
|
||
/** Exports all available remote browsers. */ | ||
exports.customLaunchers = require('./remote_browsers.json'); | ||
|
||
/** Exports a map of configured browsers, which should run on the CI. */ | ||
exports.platformMap = { | ||
'saucelabs': { | ||
required: buildConfiguration('unitTest', 'SL', true), | ||
optional: buildConfiguration('unitTest', 'SL', false) | ||
}, | ||
'browserstack': { | ||
required: buildConfiguration('unitTest', 'BS', true), | ||
optional: buildConfiguration('unitTest', 'BS', false) | ||
} | ||
}; | ||
|
||
/** Build a list of configuration (custom launcher names). */ | ||
function buildConfiguration(type, target, required) { | ||
return Object.keys(browserConfig) | ||
.map(item => [item, browserConfig[item][type]]) | ||
.filter(([, conf]) => conf.required === required && conf.target === target) | ||
.map(([item]) => `${target}_${item.toUpperCase()}`); | ||
} | ||
|
||
/** Decode the token for Travis to use. */ | ||
function decodeToken(token) { | ||
return (token || '').split('').reverse().join(''); | ||
} | ||
|
||
|
||
/** Ensures that the Travis access keys work properly. */ | ||
if (process.env.TRAVIS) { | ||
process.env.SAUCE_ACCESS_KEY = decodeToken(process.env.SAUCE_ACCESS_KEY); | ||
process.env.BROWSER_STACK_ACCESS_KEY = decodeToken(process.env.BROWSER_STACK_ACCESS_KEY); | ||
} |
Oops, something went wrong.