-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (33 loc) · 1.26 KB
/
Copy pathcodspeed.yml
File metadata and controls
40 lines (33 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CodSpeed
# Continuous performance gate: run the micro-benchmarks (benchmarks/test_perf.py) under CodSpeed's CPU
# simulation, which measures a deterministic instruction count rather than wall time, so a runner's noise
# never flakes it. CodSpeed compares each commit to the base and reports a pass/fail on the PR. A public
# repo uploads over OIDC (id-token), so no token secret is needed - only the CodSpeed GitHub App installed.
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
benchmarks:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Run benchmarks under CodSpeed
uses: CodSpeedHQ/action@f22792bfac16f3e14eb9fbea76f4a48e9cc22b93 # v4.19.1
with:
mode: simulation
run: uv run --locked --group benchmark pytest benchmarks/ --codspeed --no-cov