Repository navigation
72 lines (66 loc) · 2.38 KB
/
Copy pathcodspeed.yml
File metadata and controls
72 lines (66 loc) · 2.38 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CodSpeed benchmarks
on:
# Run the workflow for pushes to the main branch (baseline for comparisons)
# and to develop (the branch integration PRs target): before/after benchmark
# pairs like the FunctionList counts fetch (#498, flaskapi
# benchmarks/test_bench_function_counts.py) only report a delta if the
# "before" numbers were recorded on the branch the "after" PR compares
# against. If the CodSpeed project's base-branch setting still points at
# main, point it at develop so develop runs serve as the comparison baseline.
push:
branches:
- main
- develop
# Run the workflow for pull requests, so every PR gets a performance report
pull_request:
types:
- opened
- synchronize
- reopened
# Allows CodSpeed to trigger backtest runs to generate initial data
workflow_dispatch:
permissions:
contents: read
id-token: write # OpenID Connect authentication with CodSpeed
jobs:
flaskapi-benchmarks:
name: Flask API benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v7
- name: Set up uv
# Full-version pin: astral-sh/setup-uv no longer publishes bare major
# tags (same rationale as .github/workflows/ci.yml).
uses: astral-sh/setup-uv@v10.3.2
- name: Install Flask API dependencies
run: make install-flaskapi-deps
# pytest-codspeed is installed as an overlay (uv run --with) instead of
# being added to pyproject.toml: it is a benchmark-only dependency and
# should not end up in the application lock file.
- name: Run benchmarks
uses: CodSpeedHQ/action@v5
with:
mode: simulation
working-directory: flaskapi
run: uv run --with 'pytest-codspeed>=5,<6' pytest benchmarks/ --codspeed --no-cov
node-benchmarks:
name: Frontend benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v7
- name: Use Node.js 24
uses: actions/setup-node@v7
with:
node-version: 24.x
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install node dependencies
run: cd node && npm ci
- name: Run benchmarks
uses: CodSpeedHQ/action@v5
with:
mode: simulation
working-directory: node
run: npm run bench