chore: CLI-only passthrough architecture + version 2.2.0 #89
Workflow file for this run
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, master ] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - '.gitignore' | |
| - 'LICENSE' | |
| pull_request: | |
| branches: [ main, master ] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - '.gitignore' | |
| - 'LICENSE' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Run typecheck | |
| run: npm run typecheck | |
| - name: Run tests | |
| run: npm test | |
| - name: Run test coverage | |
| run: npm run test:coverage | |
| - name: Check coverage threshold | |
| run: | | |
| # Extract coverage percentage from report and fail if below threshold | |
| COVERAGE=$(npm run test:coverage 2>&1 | grep "All files" | awk '{print $4}' | sed 's/%//') | |
| echo "Coverage: $COVERAGE%" | |
| if (( $(echo "$COVERAGE < 65" | bc -l) )); then | |
| echo "❌ Coverage $COVERAGE% is below minimum threshold of 65%" | |
| exit 1 | |
| fi | |
| echo "✅ Coverage $COVERAGE% meets minimum threshold of 65%" | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build CLI | |
| run: npm run build | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run security audit | |
| run: | | |
| # Check production dependencies (block high/critical only) | |
| npm audit --audit-level high --omit=dev | |
| # Check dev dependencies (block high/critical only) | |
| npm audit --audit-level high --include=dev |