|
| 1 | +# Generated by Claude Sonnet 4 AI model |
| 2 | +name: CI |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [main, develop] |
| 7 | + pull_request: |
| 8 | + branches: [main, develop] |
| 9 | + |
| 10 | +jobs: |
| 11 | + test: |
| 12 | + name: Test on Node.js ${{ matrix.node-version }} |
| 13 | + runs-on: ubuntu-latest |
| 14 | + |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + node-version: [18.x, 20.x, 22.x] |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout code |
| 21 | + uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - name: Setup Node.js ${{ matrix.node-version }} |
| 24 | + uses: actions/setup-node@v4 |
| 25 | + with: |
| 26 | + node-version: ${{ matrix.node-version }} |
| 27 | + cache: 'npm' |
| 28 | + |
| 29 | + - name: Install dependencies |
| 30 | + run: npm ci |
| 31 | + |
| 32 | + - name: TypeScript type checking |
| 33 | + run: npm run typecheck |
| 34 | + |
| 35 | + - name: ESLint validation |
| 36 | + run: npm run lint |
| 37 | + |
| 38 | + - name: Prettier format checking |
| 39 | + run: npm run format:check |
| 40 | + |
| 41 | + - name: Run tests with coverage |
| 42 | + run: npm run test:coverage |
| 43 | + |
| 44 | + - name: Build verification |
| 45 | + run: npm run build |
| 46 | + |
| 47 | + - name: Upload coverage to Codecov |
| 48 | + if: matrix.node-version == '20.x' |
| 49 | + uses: codecov/codecov-action@v4 |
| 50 | + with: |
| 51 | + file: ./coverage/lcov.info |
| 52 | + fail_ci_if_error: false |
| 53 | + |
| 54 | + quality-gate: |
| 55 | + name: Quality Gate |
| 56 | + runs-on: ubuntu-latest |
| 57 | + needs: test |
| 58 | + |
| 59 | + steps: |
| 60 | + - name: Checkout code |
| 61 | + uses: actions/checkout@v4 |
| 62 | + |
| 63 | + - name: Setup Node.js |
| 64 | + uses: actions/setup-node@v4 |
| 65 | + with: |
| 66 | + node-version: '20.x' |
| 67 | + cache: 'npm' |
| 68 | + |
| 69 | + - name: Install dependencies |
| 70 | + run: npm ci |
| 71 | + |
| 72 | + - name: Run comprehensive quality check |
| 73 | + run: npm run quality-check |
| 74 | + |
| 75 | + - name: Verify build artifacts |
| 76 | + run: | |
| 77 | + npm run build |
| 78 | + test -f dist/index.js |
| 79 | + test -f dist/index.d.ts |
| 80 | + test -f dist/core/cli.js |
0 commit comments