Skip to content

Commit

Permalink
add manual workflow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler committed Sep 29, 2024
1 parent 93886e5 commit 00d438c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/efps.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions perf/efps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 00d438c

Please sign in to comment.