name: Node CI

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
        matrix:
          node-version: [12, 14, 16, 18, 19]
    steps:
    - uses: actions/checkout@v3
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v3
      with:
        node-version: ${{ matrix.node-version }}
        cache: npm
    - run: npm i
    - run: npm run test.only
      env:
        CI: true
