Merge pull request #155 from kaonis/feat/154-eslint-flat-config #275
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: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| protocol-compatibility: | |
| name: Protocol Compatibility Check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build protocol package | |
| run: npm run build -w packages/protocol | |
| - name: Run protocol schema tests | |
| run: npm run test -w packages/protocol -- schemas.test | |
| - name: Run protocol cross-repo contract tests | |
| run: npm run test -w packages/protocol -- contract.cross-repo | |
| - name: Verify protocol compatibility in apps | |
| run: | | |
| echo "Verifying node-agent can consume protocol package..." | |
| # Pattern matches files containing 'protocol.contract' in path | |
| npm run test -w apps/node-agent -- protocol.contract | |
| echo "Verifying cnc can consume protocol package..." | |
| # Pattern matches files containing 'protocol.contract' in path | |
| npm run test -w apps/cnc -- protocol.contract | |
| - name: Run C&C schema-validation gate | |
| run: npm run test:schema-gate -w apps/cnc | |
| validate: | |
| name: Build, Lint, Typecheck, Test | |
| runs-on: ubuntu-latest | |
| needs: protocol-compatibility | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Node-agent dependency security gate | |
| run: npm run security:audit -w apps/node-agent | |
| - name: Build, lint, typecheck, test | |
| run: npx turbo run lint typecheck test:ci build | |
| - name: Upload coverage | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: coverage-reports | |
| path: | | |
| apps/*/coverage/ | |
| retention-days: 30 |