name: CI
on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
  push:
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node: ['14', '16', '18']
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}
      - run: npm ci
      - run: npm test
      - name: Run test with experimental flag
        run: npm test
        env:
          NODE_OPTIONS: --experimental-abortcontroller --no-warnings
