ci: sync publish.yml test isolation with ci.yml
This commit is contained in:
parent
28a0dd06c7
commit
aa03d9b811
36
.github/workflows/publish.yml
vendored
36
.github/workflows/publish.yml
vendored
@ -45,16 +45,34 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
|
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run mock-heavy tests (isolated)
|
||||||
run: |
|
run: |
|
||||||
# Run tests that use mock.module() in isolated processes first
|
# These files use mock.module() which pollutes module cache
|
||||||
bun test src/plugin-handlers/config-handler.test.ts
|
# Run them in separate processes to prevent cross-file contamination
|
||||||
bun test src/hooks/compaction-context-injector/index.test.ts
|
bun test src/plugin-handlers
|
||||||
# Run remaining tests (find all test files, exclude mock-heavy ones, run in single batch)
|
bun test src/hooks/atlas
|
||||||
find src -name '*.test.ts' \
|
bun test src/hooks/compaction-context-injector
|
||||||
! -path '**/config-handler.test.ts' \
|
bun test src/features/tmux-subagent
|
||||||
! -path '**/compaction-context-injector/index.test.ts' \
|
|
||||||
| xargs bun test
|
- name: Run remaining tests
|
||||||
|
run: |
|
||||||
|
# Run all other tests (mock-heavy ones are re-run but that's acceptable)
|
||||||
|
bun test bin script src/cli src/config src/mcp src/index.test.ts \
|
||||||
|
src/agents src/tools src/shared \
|
||||||
|
src/hooks/anthropic-context-window-limit-recovery \
|
||||||
|
src/hooks/claude-code-compatibility \
|
||||||
|
src/hooks/context-injection \
|
||||||
|
src/hooks/provider-toast \
|
||||||
|
src/hooks/session-notification \
|
||||||
|
src/hooks/sisyphus \
|
||||||
|
src/hooks/todo-continuation-enforcer \
|
||||||
|
src/features/background-agent \
|
||||||
|
src/features/builtin-commands \
|
||||||
|
src/features/builtin-skills \
|
||||||
|
src/features/claude-code-session-state \
|
||||||
|
src/features/hook-message-injector \
|
||||||
|
src/features/opencode-skill-loader \
|
||||||
|
src/features/skill-mcp-manager
|
||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user