ci: split test job into 5 parallel vitest shards (#1618)

This commit is contained in:
_Kerman 2026-07-13 21:04:56 +08:00 committed by GitHub
parent 098623ed9f
commit ae1bf43c7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,6 +30,10 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4
@ -42,7 +46,7 @@ jobs:
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run test
- run: pnpm run test --shard=${{ matrix.shard }}/5
# pi-tui's suite runs on node:test (not vitest), so the root `pnpm run test`
# does not execute it; it needs its own job.