name: 'Test: E2E Performance'

on:
  workflow_call:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *' # Runs daily at midnight

jobs:
  # Cache-aware: no-op if an ancestor already populated the SHA-keyed cache.
  prepare-docker:
    uses: ./.github/workflows/prepare-docker-reusable.yml
    secrets: inherit

  build-and-test-performance:
    needs: [prepare-docker]
    uses: ./.github/workflows/test-e2e-reusable.yml
    with:
      test-mode: docker-artifact
      test-command: pnpm --filter=n8n-playwright test:performance
      currents-project-id: 'O9BJaN'
      artifact-prefix: performance
    secrets: inherit
