ci: use find/xargs to exclude mock-heavy test files

This commit is contained in:
justsisyphus 2026-01-28 01:01:45 +09:00
parent 897eea0263
commit 38156d49f3

View File

@ -47,11 +47,14 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
# Run tests that use mock.module() separately to avoid pollution # Run tests that use mock.module() in isolated processes first
bun test src/plugin-handlers/config-handler.test.ts bun test src/plugin-handlers/config-handler.test.ts
bun test src/hooks/compaction-context-injector/index.test.ts bun test src/hooks/compaction-context-injector/index.test.ts
# Run all other tests (excluding already-run mock-heavy files) # Run remaining tests (find all test files, exclude mock-heavy ones, run in single batch)
bun test --ignore '**/config-handler.test.ts' --ignore '**/compaction-context-injector/index.test.ts' find src -name '*.test.ts' \
! -path '**/config-handler.test.ts' \
! -path '**/compaction-context-injector/index.test.ts' \
| xargs bun test
typecheck: typecheck:
runs-on: ubuntu-latest runs-on: ubuntu-latest