name: test
on: [push, pull_request]
env:
  CI: true
jobs:
  ci:
    name: 'Test on Node.js ${{ matrix.node-version }}'
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [20, 22, 24]
    steps:
      - name: checkout
        uses: actions/checkout@v2
        with:
          submodules: true
          fetch-depth: 0
      - name: setup Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: Install
        run: npm install
      - name: Test
        run: npm test
      - name: Lint
        if: ${{ matrix.node-version == 24 }}
        run: yarn lint
