# GitHub actions
# https://docs.github.com/en/free-pro-team@latest/actions

name: ci-test

on: [push, pull_request]

jobs:
  test:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node_version: [10.14.2, 14.x, 15.x]

    steps:
    - uses: actions/checkout@v2

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

    - name: Coveralls GitHub Action
      uses: coverallsapp/github-action@v1.1.2
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}

    - uses: actions/cache@v2
      with:
        path: ~/.npm
        key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
        restore-keys: |
          ${{ runner.os }}-node-
    
    - run: npm install
    - run: npm run lint
    - run: npm run build --if-present
    - run: npm run test

# GitHub actions
# https://docs.github.com/en/free-pro-team@latest/actions

name: ci-test

on: [push, pull_request]

jobs:
  test:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node_version: [10.14.2, 14.x, 15.x]

    steps:
    - uses: actions/checkout@v2

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

    - uses: actions/cache@v2
      with:
        path: ~/.npm
        key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
        restore-keys: |
          ${{ runner.os }}-node-
    
    - run: npm install
    - run: npm run lint
    - run: npm run build --if-present
    - run: npm run test

  coverage:
    needs: test

    runs-on: ubuntu-latest

    steps:
      - name: Coveralls GitHub Action
        uses: coverallsapp/github-action@v1.1.2
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
Move coverall to other job
Move coverall to other job
