Skip to content

[DO-NOT-MERGE: for review only] Add CodSpeed benchmark suite and CI workflow #1

[DO-NOT-MERGE: for review only] Add CodSpeed benchmark suite and CI workflow

[DO-NOT-MERGE: for review only] Add CodSpeed benchmark suite and CI workflow #1

Workflow file for this run

name: Benchmarks
on:
push:
branches: [main]
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
id-token: write # for OpenID Connect authentication with CodSpeed
env:
MARIMO_SKIP_UPDATE_CHECK: 1
UV_EXCLUDE_NEWER: "7 days"
jobs:
codspeed:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: 🐍 Setup uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
- name: 📦 Install benchmark dependencies
run: uv sync --no-default-groups --group benchmark
- name: ⏱️ Run benchmarks
uses: CodSpeedHQ/action@4296e51e7041e24dadb86d1d6e8b9320d223dbe8 # v5.0.3
with:
mode: simulation
run: uv run --no-sync pytest benchmarks/ --codspeed