name: CI

on: [push, pull_request]

jobs:
    build:
        runs-on: ubuntu-latest

        strategy:
            matrix:
                node-version: [20.x, 22.x, 24.x]

        steps:
            # Check out the repository under $GITHUB_WORKSPACE, so this job can access it.
            - uses: actions/checkout@v4

            - name: Use Node.js ${{ matrix.node-version }}
              uses: actions/setup-node@v1
              with:
                  node-version: ${{ matrix.node-version }}

            - name: Install NPM dependencies
              run: npm ci

            - name: Run tests
              run: npm test
