-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.66 KB
/
python-bench.yaml
File metadata and controls
61 lines (56 loc) · 1.66 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
# This file is @generated by <https://github.com/liblaf/copier-python>.
# DO NOT EDIT!
name: Python / Bench
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
FORCE_COLOR: 1
jobs:
collect:
name: Collect
runs-on: ubuntu-latest
outputs:
sessions: ${{ steps.collect.outputs.sessions }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
activate-environment: true
- name: Install dependencies
run: uv sync --active --frozen --all-packages
- id: collect
name: Collect
run: |-
echo "sessions=$(
nox --list-sessions --json --tags 'bench' |
jq --compact-output '[.[].session]'
)" >> "$GITHUB_OUTPUT"
# 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.sessions != '[]'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
activate-environment: true
- name: Install dependencies
run: uv sync --active --frozen --all-packages
- name: Bench
uses: CodSpeedHQ/action@d872884a306dd4853acf0f584f4b706cf0cc72a2 # v4
with:
run: nox --tags 'bench'
mode: instrumentation