Skip to content

Commit 767ad6c

Browse files
committed
Use shards to parallelize test runs
1 parent c53b905 commit 767ad6c

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,21 @@ jobs:
2424
test:
2525
name: Test
2626
runs-on: ubuntu-latest
27+
strategy:
28+
matrix:
29+
shardIndex: [1, 2, 3]
30+
shardTotal: [3]
2731
steps:
2832
- uses: actions/checkout@v4
29-
- uses: pnpm/action-setup@v4
3033
- uses: actions/setup-node@v4
3134
with:
3235
node-version: 18
33-
cache: pnpm
34-
- run: pnpm install --frozen-lockfile
35-
- run: pnpm test
36+
37+
- name: Install pnpm
38+
uses: pnpm/action-setup@v4
39+
40+
- name: Install dependencies
41+
run: pnpm i
42+
43+
- name: Run tests
44+
run: pnpm run test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

0 commit comments

Comments
 (0)