mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-29 12:29:31 +00:00
refactor: remove shared/common.sh and 27 subprocess-heavy test files (#1728)
shared/common.sh (3852 lines) was dead code — the entire architecture was rewritten to TypeScript in cli/src/. No agent scripts source it anymore. The only consumer was github-auth.sh which just needed 4 log functions (now inlined). Remove 27 test files that spawned ~800+ real bash/bun subprocesses per run (the root cause of slow bun test). Every shared-common-*.test.ts file forked a real bash shell per test case to source shared/common.sh. CLI subprocess tests spawned `bun run index.ts` per assertion. These were integration tests, not unit tests. Also removes: - mock-tests CI job from test.yml (ran test/mock.sh which opens browser) - Stale plan files referencing deleted infrastructure - All CLAUDE.md/README.md references to the old lib/common.sh pattern Co-authored-by: lab <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
738ad18fee
commit
60986e5a05
37 changed files with 26 additions and 17853 deletions
49
.github/workflows/test.yml
vendored
49
.github/workflows/test.yml
vendored
|
|
@ -30,52 +30,3 @@ jobs:
|
|||
- name: Verify cloud bundles build
|
||||
run: bun run cli/build-clouds.ts
|
||||
|
||||
mock-tests:
|
||||
name: Mock Tests
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: cli
|
||||
run: bun install
|
||||
|
||||
- name: Run mock tests
|
||||
id: tests
|
||||
env:
|
||||
NO_COLOR: 1
|
||||
run: |
|
||||
set +e
|
||||
bash test/mock.sh 2>&1 | tee /tmp/mock-output.log
|
||||
echo "exit_code=${PIPESTATUS[0]}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Post summary
|
||||
if: always()
|
||||
run: |
|
||||
echo '## Mock Test Results' >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
grep -E 'Results:' /tmp/mock-output.log >> "$GITHUB_STEP_SUMMARY" || true
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
FAILURES=$(grep '✗' /tmp/mock-output.log | head -50)
|
||||
if [[ -n "$FAILURES" ]]; then
|
||||
echo '' >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '<details><summary>Failures (first 50)</summary>' >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '' >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
printf '%s\n' "$FAILURES" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '</details>' >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
- name: Check results
|
||||
if: always()
|
||||
run: |
|
||||
if [[ "${{ steps.tests.outputs.exit_code }}" != "0" ]]; then
|
||||
echo "Mock tests failed (exit code ${{ steps.tests.outputs.exit_code }})"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue