name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x, 15.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run build --if-present
    - run: npm test
    - uses: coverallsapp/github-action@v1.1.2
      with:
        github-token: ${{ secrets.github_token }}
        flag-name: node-${{ matrix.node-version }}
        parallel: true
  finish:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Coveralls finished
        uses: coverallsapp/github-action@v1.1.2
        with:
          github-token: ${{ secrets.github_token }}
          parallel-finished: true

name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [14.x, 16.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run build --if-present
    - run: npm test
    - uses: coverallsapp/github-action@v1.1.3
      with:
        github-token: ${{ secrets.github_token }}
        flag-name: node-${{ matrix.node-version }}
        parallel: true
  finish:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Coveralls finished
        uses: coverallsapp/github-action@v1.1.3
        with:
          github-token: ${{ secrets.github_token }}
          parallel-finished: true

Stop CI in node 10, 12. Add 16.
[dist] Stop CI in node 10, 12. Add 16.
