name: 'Checks'

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize
      - reopened
      - labeled
      - unlabeled
      - milestoned
      - demilestoned
    branches:
      - main
      - develop
      - v4
      - 'releases/**'

permissions:
  contents: read
  pull-requests: read

jobs:
  check-pr-status:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: ./.github/actions/check-pr-status

  security-lockfile-analysis:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v6
        with:
          node-version: 24
      - uses: ./.github/actions/security/lockfile
        with:
          allowedHosts: 'yarn'

  check-package-versions:
    name: Package version alignment
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v6
        with:
          node-version: 24
      - name: Install dependencies
        uses: ./.github/actions/yarn-nm-install
      - name: Check package versions
        run: yarn version:check
