redlines #13
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] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| security-events: write | |
| jobs: | |
| validate: | |
| name: Code Quality & Security | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Enable corepack | |
| run: | | |
| npm install -g corepack --force | |
| corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Run type checking | |
| run: yarn tsc --noEmit | |
| - name: Run linter | |
| run: yarn lint | |
| - name: Check code formatting | |
| run: yarn format | |
| - name: Security audit | |
| run: yarn npm audit | |
| continue-on-error: true | |
| - name: Build project | |
| run: yarn build | |
| - name: Test CLI functionality | |
| run: yarn test | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-files | |
| path: dist/ | |
| retention-days: 7 | |
| test-matrix: | |
| name: Cross-platform Testing | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Enable corepack | |
| run: | | |
| npm install -g corepack --force | |
| corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Build and test | |
| run: | | |
| yarn build | |
| yarn test |