Skip to content

Commit

Permalink
ci: Add and use --parallel argument support to wdio runner script
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 committed Oct 19, 2024
1 parent 13ae50e commit 71337ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
shell: bash -l {0}
run: |
npm ci
npm run wdio -- --headless --${{ matrix.browser }}
npm run wdio -- --headless --parallel --${{ matrix.browser }}
# The rest is needed only because otherwise the real jobs couldn't be made required for merging PRs,
# as they would fail the entire workflow run if skipped - this makes GitHub happy instead.
Expand Down
9 changes: 5 additions & 4 deletions web/packages/selfhosted/wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const firefox = process.argv.includes("--firefox");
const edge = process.argv.includes("--edge");
const browserstack = process.argv.includes("--browserstack");
const oldVersions = process.argv.includes("--oldVersions");
const maxInstances = process.argv.includes("--parallel") ? 4 : 1;

let user: string | undefined = undefined;
let key: string | undefined = undefined;
Expand All @@ -22,7 +23,7 @@ if (chrome) {
args.push("--headless");
}
capabilities.push({
"wdio:maxInstances": 1,
"wdio:maxInstances": maxInstances,
browserName: "chrome",
"goog:chromeOptions": {
args,
Expand All @@ -36,7 +37,7 @@ if (edge) {
args.push("--headless");
}
capabilities.push({
"wdio:maxInstances": 1,
"wdio:maxInstances": maxInstances,
browserName: "MicrosoftEdge",
"ms:edgeOptions": {
args,
Expand All @@ -50,7 +51,7 @@ if (firefox) {
args.push("-headless");
}
capabilities.push({
"wdio:maxInstances": 1,
"wdio:maxInstances": maxInstances,
browserName: "firefox",
"moz:firefoxOptions": {
args,
Expand Down Expand Up @@ -219,7 +220,7 @@ export const config: Options.Testrunner = {
"./test/js_api/*.ts",
"./test/integration_tests/**/test.ts",
],
maxInstances: 10,
maxInstances: maxInstances,
capabilities,
logLevel: "info",
bail: 0,
Expand Down

0 comments on commit 71337ca

Please sign in to comment.