claude-code-best/.github/workflows/ci.yml
James Feng 957076c5bd feat: 恢复 Chrome MCP 浏览器自动化支持
- 添加 scripts/setup-chrome-mcp.mjs(从上游恢复)
- 添加 docs/features/chrome-use-mcp.md 使用文档
- 恢复 postinstall 中的 Chrome MCP 设置步骤
- CI 中加 CLAUDE_CODE_SKIP_CHROME_MCP_SETUP=1 避免无 Chrome 环境失败
2026-06-04 17:27:58 +08:00

50 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [main, 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 > /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: 5) | bun test exit: $TEST_EXIT"
# Show last 30 lines of test output
tail -30 /tmp/ci-test.log
if [ "$FAILS" -le 5 ]; then
echo "✅ Test baseline OK"
else
echo "❌ Test regressions detected"
exit 1
fi
- name: Build
run: bun run build --no-splitting