mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(ci): Shard tests on CI across 3 browsers (#11048)
This commit is contained in:
committed by
Andrew Seguin
parent
b67813ef83
commit
a6475792b8
Generated
+3327
-3317
File diff suppressed because it is too large
Load Diff
@@ -104,6 +104,7 @@
|
||||
"karma-firefox-launcher": "^1.0.1",
|
||||
"karma-jasmine": "^1.1.0",
|
||||
"karma-sauce-launcher": "^1.2.0",
|
||||
"karma-sharding": "^4.4.0",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-spec-reporter": "^0.0.32",
|
||||
"madge": "^2.2.0",
|
||||
|
||||
+5
-3
@@ -5,7 +5,7 @@ module.exports = (config) => {
|
||||
|
||||
config.set({
|
||||
basePath: path.join(__dirname, '..'),
|
||||
frameworks: ['jasmine'],
|
||||
frameworks: ['sharding', 'jasmine'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-browserstack-launcher'),
|
||||
@@ -14,7 +14,8 @@ module.exports = (config) => {
|
||||
require('karma-firefox-launcher'),
|
||||
require('karma-sourcemap-loader'),
|
||||
require('karma-coverage'),
|
||||
require('karma-spec-reporter')
|
||||
require('karma-spec-reporter'),
|
||||
require('karma-sharding'),
|
||||
],
|
||||
files: [
|
||||
{pattern: 'node_modules/core-js/client/core.js', included: true, watched: false},
|
||||
@@ -134,6 +135,7 @@ module.exports = (config) => {
|
||||
throw new Error(`Platform "${platform}" unknown, but Travis specified. Exiting.`);
|
||||
}
|
||||
|
||||
config.browsers = platformMap[platform][target.toLowerCase()];
|
||||
// Set the browser list to be the same browser 3 times, to shard tests into three instances.
|
||||
config.browsers = (new Array(3)).fill(platformMap[platform][target.toLowerCase()][0]);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user