name: testing
on: push

jobs:
  test:
    strategy:
      matrix:
        node-version: [20.x, 18.x, 16.x]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"
      - run: npm install
      - run: npm run build
      - name: Lint
        run: npm run lint
      - run: npm run test