Skip to content

Update electron to v43.1.0 #3071

Update electron to v43.1.0

Update electron to v43.1.0 #3071

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 12 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
jdk: [8, 25]
os: [ubuntu-22.04, windows-2025]
browser: ["${{ vars.E2E_TEST_BROWSER }}"]
experimental: [false]
test-suffix: [release, snapshot]
include:
- jdk: 25
os: macos-14
browser: chrome
experimental: true
test-suffix: release
- jdk: 25
os: macos-14
browser: chrome
experimental: true
test-suffix: snapshot
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
env:
SBT_CHECK_TASKS: scalafmtSbtCheck scalafmtCheckAll test
SBT_SCRIPTED_TARGETS: ${{ matrix.jdk == 8 && format('sbt-scalajs-esbuild/*-{0} sbt-scalajs-esbuild-electron/basic-project-{0} sbt-scalajs-esbuild-electron/e2e-test-playwright-node-{0} sbt-scalajs-esbuild-electron/electron-builder-{0}', matrix.test-suffix) || format('*/*-{0}', matrix.test-suffix) }}
steps:
- uses: actions/checkout@v7
- uses: coursier/cache-action@v8
id: coursier-cache
- uses: coursier/setup-action@v3
with:
jvm: temurin:${{ matrix.jdk }}
# Pin to the sbt 1.x runner: the latest runner is sbt 2.x, which
# requires JDK 17+ (breaking the JDK 8 matrix) and parses CLI
# commands differently. Kept in sync with sbt releases by Renovate.
apps: sbt:1.12.13
- uses: actions/setup-node@v6
with:
node-version: 24.18.0
- name: Enable Corepack
run: corepack enable
- name: Prime corepack package managers (Windows)
if: startsWith(matrix.os, 'windows-')
shell: bash
run: |
corepack prepare pnpm@11.10.0
corepack prepare yarn@1.22.22
corepack prepare yarn@4.17.0
- name: Cache Selenium Manager browsers
uses: actions/cache@v6
with:
path: ~/.cache/selenium
key: selenium-${{ runner.os }}-${{ matrix.browser }}-${{ hashFiles('**/sbt-test/**/html.sbt') }}
restore-keys: |
selenium-${{ runner.os }}-${{ matrix.browser }}-
- name: Run tests (Linux/macOS)
if: ${{ !startsWith(matrix.os, 'windows-') }}
uses: coactions/setup-xvfb@v1
env:
E2E_TEST_BROWSER: ${{ matrix.browser }}
with:
run: sbt ${{ env.SBT_CHECK_TASKS }} "${{ steps.coursier-cache.outputs.cache-hit-coursier && 'scripted' || 'scriptedSequentialPerModule' }} ${{ env.SBT_SCRIPTED_TARGETS }}"
- name: Run tests (Windows, retry scripted on Windows fast-fail)
if: startsWith(matrix.os, 'windows-')
shell: pwsh
env:
E2E_TEST_BROWSER: ${{ matrix.browser }}
run: |
& sbt ${{ env.SBT_CHECK_TASKS }}
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$maxAttempts = 3
$logFile = Join-Path $env:RUNNER_TEMP 'sbt-scripted.log'
$scripted = "scriptedSequentialPerModule $env:SBT_SCRIPTED_TARGETS"
for ($attempt = 1; $attempt -le $maxAttempts; $attempt++) {
if (Test-Path $logFile) { Remove-Item $logFile -Force }
& sbt $scripted *>&1 | Tee-Object -FilePath $logFile
$exit = $LASTEXITCODE
if ($exit -eq 0) { exit 0 }
$log = if (Test-Path $logFile) { Get-Content $logFile -Raw } else { '' }
$retryReason = $null
if ($log -match 'Nonzero exit value: -1073740791') {
$retryReason = 'Windows fast-fail (-1073740791); see actions/runner-images#13629'
} elseif ($log -match 'Could not create lock for .*sbt-(load|server).*_lock' -or $log -match 'ServerAlreadyBootingException') {
$retryReason = 'sbt named-pipe lock race on boot; see sbt/sbt#6777'
}
if ($attempt -lt $maxAttempts -and $retryReason) {
Write-Host "::warning::$retryReason. Retrying scripted (attempt $($attempt+1)/$maxAttempts)."
Get-Process -Name java,sbt,sbtn,node,esbuild -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
Start-Sleep -Seconds 10
continue
}
exit $exit
}