ci: type-check in CI instead of leaning on the test runner #24
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, feat/**] | |
| pull_request: | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [20, 22, 24] | |
| name: node ${{ matrix.node }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: yarn | |
| - name: Install | |
| run: yarn install --frozen-lockfile | |
| - name: Build | |
| run: yarn run build | |
| # The test runner transpiles without checking types, so this step is what | |
| # catches type errors. It covers the test tree as well as src, which | |
| # tsconfig.json excludes. | |
| - name: Type check | |
| run: yarn run check-types | |
| - name: Lint | |
| run: yarn run lint | |
| - name: Test | |
| run: yarn run test |