Procházet zdrojové kódy

feat: 添加 GitHub Actions CI 流水线

push/PR 时自动运行 lint → test → build 三步检查。
使用 oven-sh/setup-bun 配置 Bun 环境。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
claude-code-best před 3 týdny
rodič
revize
17ec716dbf
2 změnil soubory, kde provedl 31 přidání a 1 odebrání
  1. 30 0
      .github/workflows/ci.yml
  2. 1 1
      TODO.md

+ 30 - 0
.github/workflows/ci.yml

@@ -0,0 +1,30 @@
+name: CI
+
+on:
+  push:
+    branches: [main, feature/*]
+  pull_request:
+    branches: [main]
+
+jobs:
+  ci:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v4
+
+      - uses: oven-sh/setup-bun@v2
+        with:
+          bun-version: latest
+
+      - name: Install dependencies
+        run: bun install --frozen-lockfile
+
+      - name: Lint
+        run: bun run lint
+
+      - name: Test
+        run: bun test
+
+      - name: Build
+        run: bun run build

+ 1 - 1
TODO.md

@@ -22,4 +22,4 @@
 - [x] git hook 的配置
 - [ ] 代码健康度检查
 - [x] 单元测试基础设施搭建 (test runner 配置)
-- [ ] CI/CD 流水线 (GitHub Actions)
+- [x] CI/CD 流水线 (GitHub Actions)