name: Build and test

on: [push, pull_request]

jobs:
  test:
    name: Test on node ${{ matrix.node_version }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node_version: [8, 10, 12]
        os: [ubuntu-latest, windows-latest, macOS-latest]

    steps:
    - uses: actions/checkout@master
    - name: Use Node.js ${{ matrix.node_version }}
      uses: actions/setup-node@v1
      with:
        version: ${{ matrix.node_version }}
    - name: npm install, build, and test
      run: |
        npm install
        npm test

name: Build and test

on: [push, pull_request]

jobs:
  test:
    name: Test on node ${{ matrix.node_version }} os ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node_version: [8, 10, 12]
        os: [ubuntu-latest, windows-latest, macOS-latest]

    steps:
    - uses: actions/checkout@master
    - name: Use Node.js ${{ matrix.node_version }}
      uses: actions/setup-node@v1
      with:
        version: ${{ matrix.node_version }}
    - name: npm install, build, and test
      run: |
        npm install
        npm test

Add os to job name (actions)
Add os to job name (actions)