fix: update CLAUDE.md — 348 tests, kernel 2.0.3, v6 on main #431
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: Championship CI/CD | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| NODE_VERSION: '20.x' | |
| BUN_VERSION: '1.x' | |
| jobs: | |
| # Security Check | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: NPM Audit | |
| run: npm audit --audit-level=moderate --omit=dev | |
| - name: Check for secrets | |
| uses: trufflesecurity/trufflehog@c563a0692fa2017ff949d219cc9f586293d41e66 | |
| with: | |
| path: ./ | |
| base: ${{ github.event.repository.default_branch }} | |
| # Primary Test Suite — Bun | |
| # Windows excluded: bunx tests timeout on Windows CI (Node smoke test covers Windows) | |
| test: | |
| name: Bun Test Suite | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint code | |
| run: npm run lint | |
| - name: Build TypeScript | |
| run: npm run build | |
| - name: Run tests (bun) | |
| run: bun test | |
| - name: Test CLI functionality | |
| run: | | |
| node dist/cli.js --help | |
| node dist/cli.js --version | |
| - name: Test project detection | |
| shell: bash | |
| run: | | |
| node dist/cli.js init --force --output test.faf | |
| ls -la test.faf | |
| head -10 test.faf | |
| node dist/cli.js score test.faf | |
| node dist/cli.js check test.faf | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v6 | |
| if: matrix.os == 'ubuntu-latest' | |
| with: | |
| name: dist-files | |
| path: dist/ | |
| # Node Smoke Test — npx users still work | |
| node-compat: | |
| name: Node Smoke Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [18.x, 20.x, 22.x] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build TypeScript | |
| run: npm run build | |
| - name: CLI smoke test | |
| run: | | |
| node dist/cli.js --version | |
| node dist/cli.js --help | |
| node dist/cli.js init --force --output test.faf | |
| node dist/cli.js score test.faf | |
| node dist/cli.js check test.faf | |
| # Code Quality | |
| quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Format Check | |
| run: npm run format -- --check | |
| continue-on-error: true | |
| # TAF - Testing Activity Feed | |
| taf: | |
| name: TAF Receipt | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ env.BUN_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Run Tests and Capture Output | |
| run: bun test 2>&1 | tee /tmp/test-output.txt | |
| - name: Convert Bun output to Jest format for TAF | |
| run: | | |
| # Extract bun test summary (e.g., " 1232 pass", " 0 fail") | |
| passed=$(grep -oP '^\s*\K\d+(?=\s+pass)' /tmp/test-output.txt || echo "0") | |
| failed=$(grep -oP '^\s*\K\d+(?=\s+fail)' /tmp/test-output.txt || echo "0") | |
| total=$((passed + failed)) | |
| # Append Jest-compatible summary line for TAF parser | |
| echo "" >> /tmp/test-output.txt | |
| if [ "$failed" -gt 0 ]; then | |
| echo "Tests: $failed failed, $passed passed, $total total" >> /tmp/test-output.txt | |
| else | |
| echo "Tests: $passed passed, $total total" >> /tmp/test-output.txt | |
| fi | |
| - name: Generate TAF Receipt | |
| uses: Wolfe-Jam/[email protected] | |
| with: | |
| test-output-file: /tmp/test-output.txt | |
| auto-commit: 'true' | |
| commit-message: 'chore(taf): update .taf receipt [skip ci]' | |
| target-branch: taf-receipts | |
| # Championship Status | |
| status: | |
| name: Championship Status | |
| runs-on: ubuntu-latest | |
| needs: [security, test, node-compat, quality] | |
| if: always() | |
| steps: | |
| - name: Check results | |
| run: | | |
| echo "FAF CLI Championship CI/CD" | |
| echo "---" | |
| failed=0 | |
| if [ "${{ needs.security.result }}" != "success" ]; then | |
| echo "FAIL Security: ${{ needs.security.result }}" | |
| failed=1 | |
| else | |
| echo "PASS Security" | |
| fi | |
| if [ "${{ needs.test.result }}" != "success" ]; then | |
| echo "FAIL Bun Tests: ${{ needs.test.result }}" | |
| failed=1 | |
| else | |
| echo "PASS Bun Tests: all platforms" | |
| fi | |
| if [ "${{ needs.node-compat.result }}" != "success" ]; then | |
| echo "FAIL Node Compat: ${{ needs.node-compat.result }}" | |
| failed=1 | |
| else | |
| echo "PASS Node Compat: 18.x, 20.x, 22.x" | |
| fi | |
| if [ "${{ needs.quality.result }}" != "success" ]; then | |
| echo "FAIL Quality: ${{ needs.quality.result }}" | |
| failed=1 | |
| else | |
| echo "PASS Quality" | |
| fi | |
| echo "---" | |
| if [ "$failed" -eq 1 ]; then | |
| echo "CI FAILED" | |
| exit 1 | |
| fi | |
| echo "PODIUM READY" |