Skip to content

Commit f52055c

Browse files
committed
ci: guard the electron macos/windows tests on ubuntu
1 parent 0496792 commit f52055c

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/CI.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,12 @@ jobs:
155155

156156
- name: Test
157157
if: ${{ !matrix.dockerfile }}
158-
run: |
159-
pnpm run test.unit
158+
uses: nick-fields/retry@v3
159+
with:
160+
timeout_minutes: 5
161+
max_attempts: 2
162+
command: |
163+
pnpm run test.unit
160164
161165
- name: Clean Tmp
162166
run: rm -rf ./tmp
@@ -167,7 +171,7 @@ jobs:
167171
uses: nick-fields/retry@v3
168172
with:
169173
timeout_minutes: 5
170-
max_attempts: 1
174+
max_attempts: 2
171175
command: |
172176
pnpm run test.unit.compat
173177
continue-on-error: true
@@ -177,11 +181,11 @@ jobs:
177181
shell: bash
178182

179183
- name: Test Electron Windows/MacOS
180-
if: "${{ !matrix.dockerfile }}"
184+
if: "${{ !contains(matrix.os, 'ubuntu') && !matrix.dockerfile }}"
181185
uses: nick-fields/retry@v3
182186
with:
183187
timeout_minutes: 5
184-
max_attempts: 1
188+
max_attempts: 2
185189
command: |
186190
pnpm run test.electron.main
187191
continue-on-error: true
@@ -191,7 +195,7 @@ jobs:
191195
uses: nick-fields/retry@v3
192196
with:
193197
timeout_minutes: 5
194-
max_attempts: 1
198+
max_attempts: 2
195199
command: |
196200
sudo apt-get install xvfb
197201
xvfb-run --auto-servernum pnpm run test.electron.main

.mocharc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const config = {
66
"expose-gc": true,
77
"v8-expose-gc": true,
88
exit: true,
9-
parallel: true,
9+
parallel: false,
1010
timeout: 6000,
1111
retries: 3,
1212
fullTrace: true,

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
},
2121
"mochaExplorer.files": "test/unit/**/*-test.ts",
2222
"mochaExplorer.mochaPath": "./node_modules/mocha",
23+
"mochaExplorer.timeout": 6000,
2324
"files.exclude": {
2425
"**/.DS_Store": true,
2526
"**/Thumbs.db": true,

0 commit comments

Comments
 (0)