perf: speed up local test runs by moving coverage to optional script
Run vitest without coverage by default (pnpm test) and add pnpm test:coverage which enforces the coverage thresholds. CI keeps using the coverage run so thresholds are still enforced on every push.
This commit is contained in:
@@ -53,9 +53,9 @@ jobs:
|
||||
BCRYPT_ROUNDS: 4
|
||||
run: |
|
||||
if [ -x /usr/bin/time ]; then
|
||||
/usr/bin/time -f 'Tests: %e seconds; peak process RSS: %M KiB' pnpm test --maxWorkers=2
|
||||
/usr/bin/time -f 'Tests: %e seconds; peak process RSS: %i KiB' pnpm test:coverage --maxWorkers=2
|
||||
else
|
||||
time pnpm test --maxWorkers=2
|
||||
time pnpm test:coverage --maxWorkers=2
|
||||
fi
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm typecheck
|
||||
pnpm biome:lint
|
||||
pnpm test
|
||||
pnpm test:coverage
|
||||
env:
|
||||
SKIP_ENV_VALIDATION: 1
|
||||
NODE_ENV: test
|
||||
|
||||
Reference in New Issue
Block a user