Skip to content

Run Benchmarks

Run Benchmarks #88

Workflow file for this run

name: Run Benchmarks
on:
schedule:
# Every day at 06:00 UTC
- cron: "0 6 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
concurrency:
group: benchmark
cancel-in-progress: false
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: app-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install package
run: pip install -e .
- name: Run benchmarks
run: python -m python_lsp_compare bench-servers --baseline-server pyright
- id: pr-metadata
name: Capture PR datetime
run: echo "timestamp=$(date -u +'%Y-%m-%d %H:%M UTC')" >> "$GITHUB_OUTPUT"
- name: Create pull request for results
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: Update benchmark results from workflow runner
branch: automation/benchmark-results
branch-suffix: timestamp
delete-branch: true
title: Update benchmark results (${{ steps.pr-metadata.outputs.timestamp }})
body: |
Automated benchmark result update from the scheduled workflow run.
add-paths: |
latest-results.md
latest-results/