name: CI

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - '*'

jobs:
  eslint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Use Node.js latest
        uses: actions/setup-node@v1

      - name: npm install
        run: npm ci

      - name: eslint
        run: npm run lint

  test:
    name: Test NodeJS ${{ matrix.node-version }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node-version: [8.x, 10.x, 12.x]
        os: [ubuntu-latest, windows-latest, macos-latest]

    steps:
      - uses: actions/checkout@v2

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

      - name: npm install and test
        run: npm cit
        env:
            CI: true

Add a new workflow to run PR tests
Add a new workflow to run PR tests
