perf: improve Jest caching and configuration in web tests (#29881)

This commit is contained in:
yyh
2025-12-19 12:00:46 +08:00
committed by GitHub
parent 95a2b3d088
commit 80f11471ae
33 changed files with 496 additions and 111 deletions

View File

@@ -35,6 +35,14 @@ jobs:
cache: pnpm
cache-dependency-path: ./web/pnpm-lock.yaml
- name: Restore Jest cache
uses: actions/cache@v4
with:
path: web/.cache/jest
key: ${{ runner.os }}-jest-${{ hashFiles('web/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-jest-
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -45,7 +53,7 @@ jobs:
run: |
pnpm exec jest \
--ci \
--runInBand \
--maxWorkers=100% \
--coverage \
--passWithNoTests