Skip to content

Commit 4808f81

Browse files
committed
feat: add initial codspeed integration
1 parent 39a4d6e commit 4808f81

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CodSpeed Benchmarks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ["*"]
7+
paths:
8+
- src/**.py
9+
- bench/**
10+
- .github/workflows/codspeed.yml
11+
pull_request:
12+
paths:
13+
- src/**.py
14+
- bench/**
15+
- .github/workflows/codspeed.yml
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read # required for actions/checkout
20+
id-token: write # required for OIDC authentication with CodSpeed
21+
22+
jobs:
23+
codspeed:
24+
name: Run CodSpeed benchmarks
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v6.0.0 # Use a fixed version
29+
with:
30+
persist-credentials: false
31+
- uses: actions/setup-python@v6.1.0 # Use a fixed version
32+
with:
33+
python-version: "3.11" # Assuming Python 3.11, adjust if needed
34+
- uses: hynek/setup-cached-uv@v2.3.0 # Use a fixed version
35+
36+
- name: Run CodSpeed benchmarks
37+
uses: CodSpeedHQ/action@v4.4.1 # Use a fixed version
38+
with:
39+
mode: instrumentation
40+
run: |
41+
uv pip install pytest-codspeed
42+
uv run pytest --codspeed bench/

0 commit comments

Comments
 (0)