This repository was archived by the owner on Feb 20, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (61 loc) Β· 1.65 KB
/
Copy pathbench.yaml
File metadata and controls
66 lines (61 loc) Β· 1.65 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
# This file is @generated by <https://github.com/liblaf/copier-python>.
# DO NOT EDIT!
name: Bench
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 1
jobs:
collect:
name: Collect
runs-on: ubuntu-latest
outputs:
has-benches: ${{ steps.collect.outputs.has-benches }}
python-versions: ${{ steps.inspect.outputs.supported_python_classifiers_json_array }}
steps:
- name: Checkout
uses: actions/checkout@v6
- id: inspect
name: Build and Inspect a Python Package
uses: hynek/build-and-inspect-python-package@v2
- name: Setup Python
uses: liblaf/actions/setup-python@v1
- id: collect
name: Collect
run: |-
if pytest -m 'benchmark' --collect-only; then
echo 'has-tests=true' >> "$GITHUB_OUTPUT"
else
code="$?"
if (("$code" == 5)); then
echo 'has-tests=false' >> "$GITHUB_OUTPUT"
else
exit "$code"
fi
fi
# CodSpeedHQ does not support the same benchmark multiple times
# so we don't run on multiple python versions here.
bench:
name: Bench
needs:
- collect
if: needs.collect.outputs.has-benches == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: liblaf/actions/setup-python@v1
- name: Install Mise
uses: jdx/mise-action@v3
- name: Bench
uses: CodSpeedHQ/action@v4
with:
run: mise run bench
mode: instrumentation
env:
FORCE_COLOR: 1