name: Tests
on: [push, pull_request]

jobs:
  nodejs:
    name: NodeJS
    strategy:
      matrix:
        os: [ubuntu-18.04, ubuntu-20.04, macos-latest, windows-latest]
        node: [12, 14, 16, 17]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node }}
      - run: yarn install
      - run: yarn test

name: Tests
on: [push, pull_request]

jobs:
  nodejs:
    name: NodeJS
    strategy:
      matrix:
        os: [ubuntu-18.04, ubuntu-20.04, macos-latest, windows-latest]
        node: [12, 14, 16, 17]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node }}
          cache: yarn
      - run: yarn install
      - run: yarn test

Add yarn caching in Github action
Add yarn caching in Github action
