mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 08:18:04 +00:00
fix(ci): resolve flaky api-command module resolution and migrate to self-hosted runner
Root cause: Bun's test runner fails to resolve exports from directory index.ts files during parallel test execution. The api-command/index.ts imports 8 subcommand modules — if any fail to load during concurrent test runs, the entire module fails with "Export not found." Fix: extract createApiCommandHandler into handler.ts (lightweight, only imports named-command-router). Test imports from handler.ts directly, bypassing the heavy index.ts that loads all subcommand modules. Also: - Remove stale api-command.ts barrel file - Use explicit /index import paths in source - Migrate CI validate to self-hosted runner with clean artifact step - Disable Bun cache (no-cache: true) on self-hosted runner
This commit is contained in:
1 parent
57019c1105
commit
41a31c8a4f
7 files changed
+62
-57
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { beforeEach, describe, expect, it } from 'bun:test';
|
||||
|
||||
import { createApiCommandHandler } from '../../../src/commands/api-command';
|
||||
import { createApiCommandHandler } from '../../../src/commands/api-command/handler';
|
||||
|
||||
let calls: string[] = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user