name: Test
"on":
  push:
    branches:
      - main
  pull_request:
    types:
      - opened
      - synchronize
jobs:
  test_matrix:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Use Node.js LTS
        uses: actions/setup-node@v4
        with:
          node-version: lts/*
          cache: npm
      - name: Install
        run: npm ci
      - name: Test
        run: npm run test
  test:
    runs-on: ubuntu-latest
    needs: test_matrix
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run lint
