name: Run Playwright Performance Tests

on:
  workflow_call:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *' # Runs daily at midnight
  pull_request:
    paths:
      - '.github/workflows/playwright-test-performance.yml'

jobs:
  build-and-test-performance:
    uses: ./.github/workflows/playwright-test-reusable.yml
    with:
      test-mode: docker-build
      test-command: pnpm --filter=n8n-playwright test:performance
      shards: '[1]'
    secrets: inherit
