From be976905039f46ad12442dba9ec25a643fc9fc34 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Tue, 14 Jan 2025 00:34:43 +0100 Subject: [PATCH] test: Back to testing on `ubuntu-latest` --- .github/workflows/build.yml | 4 ++-- test/e2e/context.ts | 7 ++----- test/unit/getPath-test-app/package.json | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c73bf3f8..73e2f11a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: # we want that the matrix keeps running, default is to cancel all if one fails. fail-fast: false matrix: - os: [ubuntu-22.04, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -73,7 +73,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-latest] electron: ${{ fromJson(needs.build.outputs.matrix) }} env: ELECTRON_VERSION: ${{ matrix.electron }} diff --git a/test/e2e/context.ts b/test/e2e/context.ts index 280fdb5e..ee6bc5bf 100644 --- a/test/e2e/context.ts +++ b/test/e2e/context.ts @@ -1,4 +1,3 @@ -import { parseSemver } from '@sentry/core'; import { ChildProcess, spawn, spawnSync } from 'child_process'; import { rmSync } from 'fs'; import { homedir } from 'os'; @@ -68,11 +67,9 @@ export class TestContext { this._clearAppUserData(); } - const version = parseSemver(this._electronVersion); - const args = [this._appPath]; - // Older versions of Electron no longer work correctly on 'ubuntu-latest' with sandbox - if (process.platform === 'linux' && (version.major || 0) < 13) { + // Electron no longer work correctly on Github Actions 'ubuntu-latest' with sandbox + if (process.platform === 'linux') { args.push('--no-sandbox'); } diff --git a/test/unit/getPath-test-app/package.json b/test/unit/getPath-test-app/package.json index a3e1e5fc..657163b0 100644 --- a/test/unit/getPath-test-app/package.json +++ b/test/unit/getPath-test-app/package.json @@ -4,6 +4,6 @@ "main": "main.js", "scripts": { - "start": "../../../node_modules/.bin/electron ." + "start": "../../../node_modules/.bin/electron . --no-sandbox" } }