chore: refactor GitHub Actions workflow to consolidate jobs and impro… #18
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: Check | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash --noprofile --norc -euo pipefail {0} | |
| jobs: | |
| quick: | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: typecheck | |
| step_name: Type check | |
| command: npm run typecheck | |
| - name: format | |
| step_name: Prettier format check | |
| command: npm run format:check | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci --prefer-offline --no-audit --no-fund | |
| - name: ${{ matrix.step_name }} | |
| run: ${{ matrix.command }} | |
| extended: | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: types | |
| step_name: Verify generated worker types are up to date | |
| command: npm run types:check | |
| - name: test | |
| step_name: Run unit tests | |
| command: npm run test:run | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci --prefer-offline --no-audit --no-fund | |
| - name: ${{ matrix.step_name }} | |
| run: ${{ matrix.command }} |