ci: improve CI jobs setup #2200
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - 'website/**' | |
| pull_request: | |
| paths-ignore: | |
| - 'website/**' | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Lint (Node 24) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 | |
| - name: Setup workspace | |
| uses: ./.github/actions/setup-pnpm-node | |
| with: | |
| node-version: '24' | |
| - name: Lint | |
| run: pnpm lint:ci | |
| typecheck: | |
| name: TypeScript (Node 24) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 | |
| - name: Setup workspace | |
| uses: ./.github/actions/setup-pnpm-node | |
| with: | |
| node-version: '24' | |
| - name: Type check | |
| run: pnpm typecheck | |
| test_pr: | |
| name: Tests [Node 24] | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 | |
| - name: Setup workspace | |
| uses: ./.github/actions/setup-pnpm-node | |
| with: | |
| node-version: '24' | |
| - name: Run tests | |
| run: pnpm test | |
| test_main_matrix: | |
| name: Tests [Node ${{ matrix.node_version }}] | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node_version: ['18', '20', '22', '24'] | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 | |
| - name: Setup workspace | |
| uses: ./.github/actions/setup-pnpm-node | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| - name: Run tests | |
| run: pnpm test |