name: PR CI

on:
  pull_request:
    branches:
      - mealie-next

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
  cancel-in-progress: true

jobs:
  pull-request-lint:
    name: "Lint PR"
    uses: ./.github/workflows/pull-request-lint.yml

  backend-tests:
    name: "Backend Server Tests"
    uses: ./.github/workflows/partial-backend.yml

  frontend-tests:
    name: "Frontend and End-to-End Tests"
    uses: ./.github/workflows/partial-frontend.yml

  container-scanning:
    name: "Trivy Container Scanning"
    uses: ./.github/workflows/partial-trivy-container-scanning.yml

  end-to-end:
    name: "End-to-End Tests"
    uses: ./.github/workflows/e2e.yml

  code-ql:
    name: "CodeQL"
    uses: ./.github/workflows/codeql.yml
    permissions:
      actions: read
      contents: read
      security-events: write
