Skip to content

fix(with-incident-details): Ensure the token has the correct scope #2157

fix(with-incident-details): Ensure the token has the correct scope

fix(with-incident-details): Ensure the token has the correct scope #2157

Workflow file for this run

name: Performance benchmark
on:
pull_request:
workflow_dispatch:
inputs:
run_options:
description: 'Additional options to pass to `run`'
python_version:
description: 'Python version to use (use https://github.com/actions/setup-python#supported-version-syntax)'
default: '3.10'
env:
PDM_VERSION: 2.20.1
DEFAULT_PYTHON_VERSION: '3.10'
jobs:
benchmark:
name: Run performance benchmark
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-22.04
env:
PYTHONUNBUFFERED: 1
# How many times to repeat each run
REPEATS: 3
# If a run takes more than $MAX_DELTA seconds compared to reference, fail the job
MAX_DELTA: 3
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
version: ${{ env.PDM_VERSION }}
python-version: ${{ inputs.python_version || env.DEFAULT_PYTHON_VERSION }}
- name: Install dependencies
run: |
python --version
pdm sync --global --project . --prod
- name: Setup benchmark
run: |
scripts/perfbench/perfbench setup
- name: Run benchmark
env:
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
run: |
scripts/perfbench/perfbench run --repeats $REPEATS ${{ inputs.run_options }}
- name: Generate report
run: |
scripts/perfbench/perfbench report --max-delta $MAX_DELTA >> $GITHUB_STEP_SUMMARY