name: node-js-ci

on:
  pull_request:
    branches:
      - master
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        node: ['14', '16']

    name: Node ${{ matrix.node }} on ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - name: Test
        uses: actions/setup-node@v2.4.1
        with:
          node-version: ${{ matrix.node }}
      - run: npm install
      - run: npm test
