name: CI workflow
on: [push, pull_request]
jobs:
  browsers:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2.1.5
    - name: Install Dependencies
      run: npm install
    - name: Test
      run: npm run test-in-browsers
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x]
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2.1.5
      with:
        node-version: ${{ matrix.node-version }}
    - name: Install Dependencies
      run: npm install --ignore-scripts
    - name: Test
      run: npm run test
  test-legacy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [6.x, 8.x]
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2.1.5
      with:
        node-version: ${{ matrix.node-version }}
    - name: Install Dependencies
      run: npm install --ignore-scripts
    - name: Test
      run: npm run test-legacy
