name: Test

on:
  push:
    branches:
      - "*"
  pull_request:
    branches:
      - master
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: yarn

      - name: Install & Test
        run: |
          yarn install --frozen-lockfile
          yarn test
