name: CI

on: [push]

jobs:
  test:
    name: Test Node.js ${{ matrix.node-version }}
    runs-on: ubuntu-latest

    strategy:
      fail-fast: true
      matrix:
        node-version:
          - 18
          - 22
          - 23

    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'pnpm'

      - run: pnpm install --frozen-lockfile --strict-peer-dependencies
      - run: pnpm build
      - run: pnpm test
