name: Unit Tests

on:
  pull_request:
    types: [opened, reopened, edited, synchronize]

env:
  PUBLIC_MAX_LOOP_TIME_MS: 1500
  PUBLIC_MAX_ITERATIONS: 2000

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [20.x]

    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
          cache: "yarn"

      - name: Execute Unit tests
        run: |
          yarn install --frozen-lockfile
          yarn run test:unit