CI #418
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: | |
| release: | |
| types: [released] | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| permissions: | |
| id-token: write # Required for publishing to NPM (Trusted Publishers) | |
| contents: read | |
| env: | |
| NODE_VERSION: 26 | |
| jobs: | |
| quality_checks: | |
| name: Quality checks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| strategy: | |
| matrix: | |
| node: [22, 24, 26] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup NodeJS ${{ matrix.node }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'npm' | |
| - name: Install deps | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test -- --coverage | |
| security_checks: | |
| name: Security checks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Audit dependencies | |
| run: npm audit --audit-level=low --omit=dev | |
| lint: | |
| name: Lint | |
| if: github.ref != 'refs/heads/main' # Don't run for main branch | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Lint Code Base | |
| uses: github/super-linter/slim@v5 | |
| env: | |
| VALIDATE_ALL_CODEBASE: false | |
| DEFAULT_BRANCH: main | |
| VALIDATE_JAVASCRIPT_ES: true | |
| VALIDATE_JSON: true | |
| VALIDATE_YAML: true | |
| publish: | |
| name: Publish | |
| needs: [quality_checks, security_checks, lint] | |
| if: github.event_name == 'release' && github.event.action == 'released' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: https://registry.npmjs.org | |
| scope: '@quickcase' | |
| package-manager-cache: false | |
| - name: Install deps | |
| run: npm ci | |
| - name: Build with Webpack | |
| run: npm run build | |
| - name: Publish | |
| run: npm publish |