name: Node.js CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x, 16.x]

    steps:
      - uses: actions/checkout@v2

      - name: Cache node modules
        uses: actions/cache@v2
        env:
          cache-name: cache-node-modules
        with:
          # npm cache files are stored in `~/.npm` on Linux/macOS
          path: ~/.npm
          key: ${{ runner.os }}-${{ matrix.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-${{ matrix.node-version }}-build-${{ env.cache-name }}-
            ${{ runner.os }}-${{ matrix.node-version }}-build-
            ${{ runner.os }}-${{ matrix.node-version }}-

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      - run: npm install
      - run: bash test/setup.sh ${{ matrix.node-version }}
      - run: bash run-tests.sh ${{ matrix.node-version }}
      - run: npm run coverage

name: Node.js CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x, 16.x]

    steps:
      - uses: actions/checkout@v2

      - name: Cache node modules
        uses: actions/cache@v2
        env:
          cache-name: cache-node-modules
        with:
          # npm cache files are stored in `~/.npm` on Linux/macOS
          path: ~/.npm
          key: ${{ runner.os }}-${{ matrix.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-${{ matrix.node-version }}-build-${{ env.cache-name }}-
            ${{ runner.os }}-${{ matrix.node-version }}-build-
            ${{ runner.os }}-${{ matrix.node-version }}-

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      - run: npm install
      - run: bash test/setup.sh ${{ matrix.node-version }}
      - run: bash run-tests.sh ${{ matrix.node-version }}

Remove final coverage CI step for now
Remove final coverage CI step for now

Doesn't seem to work
