name: Tests

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - run: set -o pipefail
      - run: corepack enable

      - uses: actions/setup-node@main
        with:
          node-version: 20
          registry-url: 'https://registry.npmjs.org'
          cache: pnpm

      - run: pnpm install

      - run: pnpm test
