From 7688d48878556af4bff8ee524780cf11db81c259 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 30 Dec 2024 09:12:20 -0800 Subject: [PATCH] ci: guard the electron macos/windows tests on ubuntu --- .github/workflows/CI.yml | 8 ++++---- .mocharc.js | 4 ++-- .vscode/settings.json | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7f9fd547..e86f0f8c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -167,7 +167,7 @@ jobs: uses: nick-fields/retry@v3 with: timeout_minutes: 5 - max_attempts: 1 + max_attempts: 3 command: | pnpm run test.unit.compat continue-on-error: true @@ -177,11 +177,11 @@ jobs: shell: bash - name: Test Electron Windows/MacOS - if: "${{ !matrix.dockerfile }}" + if: "${{ !contains(matrix.os, 'ubuntu') && !matrix.dockerfile }}" uses: nick-fields/retry@v3 with: timeout_minutes: 5 - max_attempts: 1 + max_attempts: 3 command: | pnpm run test.electron.main continue-on-error: true @@ -191,7 +191,7 @@ jobs: uses: nick-fields/retry@v3 with: timeout_minutes: 5 - max_attempts: 1 + max_attempts: 3 command: | sudo apt-get install xvfb xvfb-run --auto-servernum pnpm run test.electron.main diff --git a/.mocharc.js b/.mocharc.js index b3b2e22d..404f4787 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -6,9 +6,9 @@ const config = { "expose-gc": true, "v8-expose-gc": true, exit: true, - parallel: true, + parallel: false, timeout: 6000, - retries: 3, + retries: 5, fullTrace: true, bail: false, } diff --git a/.vscode/settings.json b/.vscode/settings.json index c0a09f4b..2887daba 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,6 +20,7 @@ }, "mochaExplorer.files": "test/unit/**/*-test.ts", "mochaExplorer.mochaPath": "./node_modules/mocha", + "mochaExplorer.timeout": 6000, "files.exclude": { "**/.DS_Store": true, "**/Thumbs.db": true,