name: Unit Tests

on:
  pull_request:
    branches: [main, stable]
  workflow_dispatch:

jobs:
  unit_test:
    uses: HyperPlay-Gaming/workflows/.github/workflows/nodejs_commands.yml@main
    with:
      node_version: '22'
      pkg_manager: 'pnpm'
      install: 'pnpm install --frozen-lockfile'
      name: 'test'
      command_one: 'pnpm test'
      command_one_name: 'Run tests.'
      checkout_recursive: false
    secrets:
      NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
