Skip to content

Commit 71e634a

Browse files
author
Tin Sever
committed
ci: use runInBand and robust directory setup to fix test collisions
1 parent b972ab8 commit 71e634a

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ jobs:
3030
run: npm run typecheck
3131

3232
- name: Setup fonts directory
33-
run: mkdir -p ~/.local/share/fonts
33+
run: |
34+
mkdir -p -v ~/.local/share/fonts
35+
mkdir -p -v ~/Library/Fonts
3436
3537
- name: Run tests
36-
run: npm test
38+
run: npm test -- --runInBand
3739

3840
- name: Test CLI installation
3941
run: |
@@ -42,5 +44,5 @@ jobs:
4244
4345
- name: Upload coverage to Codecov (Node 20 only)
4446
if: matrix.node-version == '20.x'
45-
run: npm run test:coverage
47+
run: npm run test:coverage -- --runInBand
4648
continue-on-error: true

.github/workflows/release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,17 @@ jobs:
3333
- name: Run typecheck
3434
run: npm run typecheck
3535

36-
- name: Setup fonts directory (Linux)
37-
if: runner.os == 'Linux'
38-
run: mkdir -p ~/.local/share/fonts
36+
- name: Setup fonts directory
37+
run: |
38+
if [ "$RUNNER_OS" == "Linux" ]; then
39+
mkdir -p -v ~/.local/share/fonts
40+
elif [ "$RUNNER_OS" == "macOS" ]; then
41+
mkdir -p -v ~/Library/Fonts
42+
fi
43+
shell: bash
3944

4045
- name: Run tests
41-
run: npm test
46+
run: npm test -- --runInBand
4247

4348
- name: Test CLI installation
4449
run: |

0 commit comments

Comments
 (0)