diff --git a/.github/workflows/efps.yml b/.github/workflows/efps.yml index dbe3c389a63..d46e9c6d557 100644 --- a/.github/workflows/efps.yml +++ b/.github/workflows/efps.yml @@ -1,6 +1,18 @@ name: eFPS Test on: pull_request: + workflow_dispatch: + inputs: + reference_tag: + description: "Reference tag for comparison" + required: true + default: "latest" + enable_profiler: + description: "Enable profiler" + required: true + type: boolean + default: false + jobs: install: timeout-minutes: 30 @@ -64,6 +76,8 @@ jobs: VITE_PERF_EFPS_PROJECT_ID: ${{ secrets.PERF_EFPS_PROJECT_ID }} VITE_PERF_EFPS_DATASET: ${{ secrets.PERF_EFPS_DATASET }} PERF_EFPS_SANITY_TOKEN: ${{ secrets.PERF_EFPS_SANITY_TOKEN }} + REFERENCE_TAG: ${{ github.event.inputs.reference_tag || 'latest' }} + ENABLE_PROFILER: ${{ github.event.inputs.enable_profiler || false }} run: pnpm efps:test - name: PR comment with report diff --git a/perf/efps/index.ts b/perf/efps/index.ts index 85efd2ccf99..6e7e864e962 100644 --- a/perf/efps/index.ts +++ b/perf/efps/index.ts @@ -24,8 +24,10 @@ const WARNING_THRESHOLD = 0.2 const TEST_ATTEMPTS = process.env.CI ? 3 : 1 const HEADLESS = true -const ENABLE_PROFILER = false -const REFERENCE_TAG = 'latest' +// eslint-disable-next-line turbo/no-undeclared-env-vars +const ENABLE_PROFILER = process.env.ENABLE_PROFILER === 'true' +// eslint-disable-next-line turbo/no-undeclared-env-vars +const REFERENCE_TAG = process.env.REFERENCE_TAG || 'latest' const TESTS = [article, recipe, synthetic] const projectId = process.env.VITE_PERF_EFPS_PROJECT_ID!