fix(ci): switch to corepack for pnpm setup and activation #27
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] | |
| jobs: | |
| test: | |
| name: Typecheck & Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [18, 20] | |
| env: | |
| CI: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - name: Enable corepack (provides pnpm) | |
| run: corepack enable | |
| - name: Prepare pnpm | |
| run: corepack prepare [email protected] --activate | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck | |
| run: pnpm run typecheck | |
| - name: Run tests | |
| run: pnpm test -- --run | |
| - name: Run SSR check | |
| run: pnpm run check:ssr |