claude-code-best/.github/workflows/ci.yml
James Feng 18f5f99e7d fix: resolve all 14 test failures to 0
- Remove duplicate notifyAutomationStateChanged that shadowed real impl (sessionState 3→0)
- Fix messages.ts stub: re-export instead of type-only (ExecuteTool/VaultHttpFetch mock leaks)
- Fix CWD-dependent paths in queryModelOpenAI and VaultHttpFetch tests (use import.meta.url)
- Add missing logger.ts stub for remote-control-server
- CI: add --isolate flag, baseline 14→0
- Tests: 3643 pass,14 fail → 3857 pass,0 fail (--isolate)
2026-06-05 01:17:04 +08:00

50 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [main, acp, feature/*]
pull_request:
branches: [main]
env:
BUN_CONFIG_REGISTRY: https://registry.npmjs.org/
jobs:
ci:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.14'
- name: Replace mirror URLs
run: sed -i '' 's|registry.npmmirror.com|registry.npmjs.org|g' bun.lock
- name: Install dependencies
env:
CLAUDE_CODE_SKIP_CHROME_MCP_SETUP: '1'
run: bun install --frozen-lockfile
- name: Test
run: |
set +e
bun test --isolate > /tmp/ci-test.log 2>&1
TEST_EXIT=$?
FAILS=$(grep -oE '[0-9]+ fail' /tmp/ci-test.log | tail -1 | grep -oE '[0-9]+')
if [ -z "$FAILS" ]; then FAILS=0; fi
echo "Failures: $FAILS (baseline: 0) | bun test exit: $TEST_EXIT"
# Show last 30 lines of test output
tail -30 /tmp/ci-test.log
if [ "$FAILS" -le 0 ]; then
echo "✅ Test baseline OK"
else
echo "❌ Test regressions detected"
exit 1
fi
- name: Build
run: bun run build --no-splitting