name: test

on:
  pull_request:
    types: [opened, review_requested, ready_for_review, synchronize]

jobs:
  unit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install node
        uses: actions/setup-node@v3
        with:
          node-version-file: '.nvmrc'
          cache: npm
      - run: npm ci
      - run: npm run format:check
      - run: npm run test
      - run: npx tsc
