-
Notifications
You must be signed in to change notification settings - Fork 179
👷 Split unit-bs CI job per browser #4623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
a311531
a1b4dc5
de471cc
9ba5afb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| export interface BrowserConfiguration { | ||
| id?: string | ||
| sessionName: string | ||
| name: string | ||
| version?: string | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,16 @@ import { getBuildInfos } from '../envUtils.ts' | |
| import { browserConfigurations } from './browsers.conf.ts' | ||
| import karmaBaseConf from './karma.base.conf.js' | ||
|
|
||
| const selectedBrowser = process.env.BS_BROWSER | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ question: would it be possible to use parseArgs here, so we don't need to read it in ci-bs.ts and pass it here as env variable?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so. |
||
| const filteredConfigurations = selectedBrowser | ||
| ? browserConfigurations.filter((configuration) => configuration.id === selectedBrowser) | ||
| : browserConfigurations | ||
|
|
||
| if (selectedBrowser && filteredConfigurations.length === 0) { | ||
| const availableIds = browserConfigurations.map((c) => c.id).join(', ') | ||
| throw new Error(`Unknown BS_BROWSER "${selectedBrowser}". Available: ${availableIds}`) | ||
| } | ||
|
|
||
| // eslint-disable-next-line import/no-default-export | ||
| export default function (config) { | ||
| config.set({ | ||
|
|
@@ -13,8 +23,8 @@ export default function (config) { | |
| ], | ||
| plugins: [...karmaBaseConf.plugins, 'karma-browserstack-launcher'], | ||
| reporters: [...karmaBaseConf.reporters, 'BrowserStack'], | ||
| browsers: browserConfigurations.map((configuration) => configuration.sessionName), | ||
| concurrency: 5, | ||
| browsers: filteredConfigurations.map((configuration) => configuration.sessionName), | ||
| concurrency: 1, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| browserDisconnectTolerance: 3, | ||
| captureTimeout: 2 * 60 * 1000, | ||
| browserStack: { | ||
|
|
@@ -25,7 +35,7 @@ export default function (config) { | |
| video: false, | ||
| }, | ||
| customLaunchers: Object.fromEntries( | ||
| browserConfigurations.map((configuration) => [ | ||
| filteredConfigurations.map((configuration) => [ | ||
| configuration.sessionName, | ||
| // See https://github.com/karma-runner/karma-browserstack-launcher#per-browser-options | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.