name: "Unit Test"
on:
  push:
    branches:
      - main
  pull_request:
    types:
      - opened
      - synchronize
      - reopened
      - ready_for_review

jobs:
  test:
    runs-on: ubuntu-latest

    env:
      NODE_OPTIONS: --max_old_space_size=4096

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Install dependencies
        run: npm install

      - name: Run test
        run: npm test
