Merge pull request #107 from webdeveric/ci/release #251
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: Node.js CI | |
| on: [push] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| HUSKY: 0 | |
| jobs: | |
| ci: | |
| name: Continuous Integration | |
| permissions: | |
| contents: read # for checkout | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| node: [22, 24, 26] | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: Use Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'pnpm' | |
| - name: Installing dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Audit dependencies | |
| run: pnpm audit --ignore-registry-errors --audit-level=moderate --prod | |
| - name: Verify registry signatures for installed packages | |
| run: pnpm audit signatures | |
| - name: Linting | |
| run: pnpm lint | |
| - name: Type checking | |
| run: pnpm typecheck | |
| - name: Spell checking | |
| run: pnpm spellcheck | |
| - name: Testing | |
| run: pnpm coverage | |
| - name: Building | |
| run: pnpm build | |
| sarif: | |
| name: SARIF Report | |
| needs: ci | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # for checkout | |
| security-events: write # for uploading SARIF report | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: Use Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: '.node-version' | |
| cache: 'pnpm' | |
| - name: Installing dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Building | |
| run: pnpm build | |
| - name: Generate SARIF report | |
| run: pnpm validate --check --info --reporter sarif > report.sarif.json | |
| - name: Upload SARIF report | |
| if: always() | |
| uses: github/codeql-action/upload-sarif@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0 | |
| with: | |
| sarif_file: report.sarif.json |