claude-code-best/.github/workflows/ci.yml
James Feng c83542af8f fix(ci): 修复 postinstall + Bun 版本对齐
- 移除缺失的 setup-chrome-mcp.mjs (CCB Chrome 集成,CCP 不需要)
- CI Bun: 1.3.11 → 1.3.14 (对齐本地环境)
2026-06-04 17:08:12 +08:00

45 lines
1016 B
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
run: bun install --frozen-lockfile
- name: Test
run: |
bun test 2>&1 | tee /tmp/ci-test.log
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: 2)"
if [ "$FAILS" -le 2 ]; then
echo "✅ Test baseline OK"
exit 0
else
echo "❌ Test regressions detected"
exit 1
fi
- name: Build
run: bun run build