name: Build CI (Pull Request)

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x, 16.x]
    steps:
    - uses: actions/checkout@v2
    - name: Build with Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run test

name: Build CI (Pull Request)

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x, 16.x, 18.x, 19.x]
    steps:
    - uses: actions/checkout@v2
    - name: Build with Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - name: Set ENV
      if: matrix.node-version > '16'
      run: echo "NODE_OPTIONS=--no-experimental-fetch" >> $GITHUB_ENV
    - run: npm ci
    - run: npm run test
    - name: Unset ENV
      if: matrix.node-version > '16'
      run: echo "NODE_OPTIONS=''" >> $GITHUB_ENV

Add support for node 18 and 19 in pull request checks
Add support for node 18 and 19 in pull request checks
