name: Run tests

on: push

jobs:
  run-tests:
    runs-on: ubuntu-latest

    strategy:
      fail-fast: true
      matrix:
        node_version:
          - "14"
          - "16"
          - "18"

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v2
        name: Use Node.js v${{matrix.node_version}}
        with:
          node-version: ${{matrix.node_version}}
          cache: "yarn"

      - run: yarn install

      - run: yarn test
