name: Tests
on:
  push:
    branches:
      - main
  pull_request:
    types: [opened, reopened, synchronize, ready_for_review]
    branches:
      - main

jobs:
  tests:
    runs-on: [ubuntu-latest]
    strategy:
      matrix:
        node-version: [22]
      fail-fast: false

    steps:
      - name: Check Out Source Code
        uses: actions/checkout@v7
        with:
          fetch-depth: 0

      - name: Set up Node.js
        uses: actions/setup-node@v7
        with:
          node-version: ${{ matrix.node-version }}

      - name: Set up
        run: yarn

      - name: Build
        run: yarn build

      - name: Lint
        run: yarn lint

      - name: Test
        run: yarn test
