name: Typecheck

on:
  push:
  pull_request:

jobs:
  typecheck:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        package: [backend, workers]
    defaults:
      run:
        working-directory: ${{ matrix.package }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npm run typecheck
