Merge pull request #108 from teng-lin/fix/protocol-gaps-v3 #367
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x, 24.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Architecture boundary checks | |
| run: pnpm check:arch | |
| - name: Run tests | |
| run: pnpm -r --include-workspace-root test | |
| - name: Run linter | |
| run: pnpm run lint | |
| - name: Build | |
| run: pnpm run build | |
| e2e-deterministic: | |
| name: E2E Deterministic | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Verify E2E parity matrix prerequisites | |
| run: pnpm test:e2e:parity:check | |
| - name: Run deterministic e2e lane | |
| run: pnpm test:e2e:deterministic | |
| e2e-realcli-smoke-process: | |
| name: E2E Real CLI Smoke (Process) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Real CLI prerequisites | |
| id: realcli | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| run: | | |
| if [ -n "${ANTHROPIC_API_KEY}" ]; then | |
| echo "enabled=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "enabled=false" >> "$GITHUB_OUTPUT" | |
| echo "Skipping real CLI shard: ANTHROPIC_API_KEY is not configured." | |
| fi | |
| - name: Install pnpm | |
| if: steps.realcli.outputs.enabled == 'true' | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| if: steps.realcli.outputs.enabled == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: pnpm | |
| - name: Install dependencies | |
| if: steps.realcli.outputs.enabled == 'true' | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Claude CLI | |
| if: steps.realcli.outputs.enabled == 'true' | |
| run: npm install -g ./anthropic-ai-claude-code-2.1.45.tgz | |
| - name: Run real CLI smoke process shard | |
| if: steps.realcli.outputs.enabled == 'true' | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| run: pnpm test:e2e:realcli:smoke:process | |
| e2e-realcli-smoke-session: | |
| name: E2E Real CLI Smoke (Session) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Real CLI prerequisites | |
| id: realcli | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| run: | | |
| if [ -n "${ANTHROPIC_API_KEY}" ]; then | |
| echo "enabled=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "enabled=false" >> "$GITHUB_OUTPUT" | |
| echo "Skipping real CLI shard: ANTHROPIC_API_KEY is not configured." | |
| fi | |
| - name: Install pnpm | |
| if: steps.realcli.outputs.enabled == 'true' | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| if: steps.realcli.outputs.enabled == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: pnpm | |
| - name: Install dependencies | |
| if: steps.realcli.outputs.enabled == 'true' | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Claude CLI | |
| if: steps.realcli.outputs.enabled == 'true' | |
| run: npm install -g ./anthropic-ai-claude-code-2.1.45.tgz | |
| - name: Run real CLI smoke session shard | |
| if: steps.realcli.outputs.enabled == 'true' | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| run: pnpm test:e2e:real:claude:smoke | |
| type-check: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Type check | |
| run: pnpm run typecheck | |
| coverage: | |
| name: Code Coverage | |
| runs-on: ubuntu-latest | |
| # Run coverage on all PRs and pushes to main | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tests with coverage | |
| run: pnpm -r --include-workspace-root test -- --coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false # vitest thresholds enforce coverage; Codecov upload failures are transient |