Skip to content

Commit

Permalink
Bump karma and dependencies
Browse files Browse the repository at this point in the history
Changes to the config were required to get latest firefox running:
https://saucelabs.com/resources/blog/update-firefox-tests-before-oct-4-2022

Thanks to hotwired/stimulus#601 and trix I was able to get the config working, the secret was that resolution for `webdriverio` needs to go in the root `package.json`.

In the short-to-mid term I'd like to explore updating our builds to use the latest yarn, or remove it entirely, as that seems to be a common thread in these issues.

There was another investigation into mitigating the flaky saucelabs failures in rails#51990 but I think let's make sure we're on the latest version and browsers to see if that improves things or provides new and interesting error states first.
  • Loading branch information
zzak committed Oct 5, 2024
1 parent 0df09dd commit 34b3e41
Show file tree
Hide file tree
Showing 4 changed files with 2,303 additions and 559 deletions.
45 changes: 26 additions & 19 deletions actioncable/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,34 @@ const config = {
singleRun: true,
autoWatch: false,

captureTimeout: 180000,
browserDisconnectTimeout: 180000,
concurrency: 4,
captureTimeout: 15000,
browserDisconnectTimeout: 15000,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 300000,
browserNoActivityTimeout: 100000,
}

if (process.env.CI) {
config.customLaunchers = {
sl_chrome: sauce("chrome", 70),
sl_ff: sauce("firefox", 63),
sl_safari: sauce("safari", 12.0, "macOS 10.13"),
sl_edge: sauce("microsoftedge", 17.17134, "Windows 10"),
sl_chrome: { base: "SauceLabs", browserName: "chrome", version: "latest" },
sl_ff: {
base: "SauceLabs",
browserName: "firefox",
browserVersion: "latest",
"moz:debuggerAddress": true
},
sl_safari: {
base: "SauceLabs",
browserName: "safari",
version: "12.1",
platform: "macOS 10.13"
},
sl_edge: {
base: "SauceLabs",
browserName: "microsoftedge",
version: "latest",
platform: "Windows 10"
}
}

config.browsers = Object.keys(config.customLaunchers)
Expand All @@ -35,21 +51,12 @@ if (process.env.CI) {
config.sauceLabs = {
testName: "ActionCable JS Client",
retryLimit: 3,
idleTimeout: 600,
commandTimeout: 600,
maxDuration: 900,
build: buildId(),
}

function sauce(browserName, version, platform) {
const options = {
base: "SauceLabs",
browserName: browserName.toString(),
version: version.toString(),
}
if (platform) {
options.platform = platform.toString()
}
return options
}

function buildId() {
const { BUILDKITE_JOB_ID } = process.env
return BUILDKITE_JOB_ID
Expand Down
6 changes: 3 additions & 3 deletions actioncable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"eslint": "^8.40.0",
"eslint-plugin-import": "^2.29.0",
"karma": "^6.4.2",
"karma-chrome-launcher": "^2.2.0",
"karma-qunit": "^2.1.0",
"karma-sauce-launcher": "^1.2.0",
"karma-chrome-launcher": "^3.2.0",
"karma-qunit": "^4.2.1",
"karma-sauce-launcher": "^4.3.6",
"mock-socket": "^2.0.0",
"qunit": "^2.8.0",
"rollup": "^2.35.1",
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"actioncable",
"actiontext",
"activestorage"
]
],
"resolutions": {
"webdriverio": "^7.19.5"
}
}
Loading

0 comments on commit 34b3e41

Please sign in to comment.