Skip to content

Commit dbf5aa3

Browse files
committed
Update actions
1 parent 22da069 commit dbf5aa3

File tree

3 files changed

+58
-41
lines changed

3 files changed

+58
-41
lines changed

.github/workflows/Bench.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,3 @@ jobs:
4747
--adapter python_pytest \
4848
--err \
4949
"pytest --benchmark-json results.json tests/test_bench.py"
50-
51-
benchmark_with_codspeed:
52-
runs-on: ubuntu-latest
53-
steps:
54-
- uses: actions/checkout@v4
55-
- name: Set up uv
56-
run: curl -LsSf https://astral.sh/uv/install.sh | sh
57-
- name: Set up Python
58-
uses: actions/setup-python@v5
59-
with:
60-
python-version: 3.12
61-
- name: Restore uv cache
62-
uses: actions/cache@v4
63-
with:
64-
path: ${{ env.UV_CACHE_DIR }}
65-
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
66-
restore-keys: |
67-
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
68-
uv-${{ runner.os }}
69-
70-
- name: Install
71-
run: |
72-
uv build --config-setting profile==profiling
73-
74-
- name: Run benchmarks
75-
uses: CodSpeedHQ/action@v3
76-
with:
77-
run: uv run pytest tests/ --codspeed
78-
79-
- name: Minimize uv cache
80-
run: uv cache prune --ci

.github/workflows/CodSpeed.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Bench
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
env:
11+
UV_CACHE_DIR: "/tmp/.uv-cache"
12+
13+
jobs:
14+
benchmark_with_codspeed:
15+
name: Continuous Benchmarking with CodSpeed
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Collect Workflow Telemetry
19+
uses: runforesight/workflow-telemetry-action@v2
20+
with:
21+
comment_on_pr: false
22+
- uses: actions/checkout@v4
23+
- name: Set up uv
24+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: 3.12
29+
- name: Restore uv cache
30+
uses: actions/cache@v4
31+
with:
32+
path: ${{ env.UV_CACHE_DIR }}
33+
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
34+
restore-keys: |
35+
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
36+
uv-${{ runner.os }}
37+
38+
- name: Install
39+
run: |
40+
uv build --config-setting profile==profiling
41+
42+
- name: Run benchmarks
43+
uses: CodSpeedHQ/action@v3
44+
with:
45+
run: uv run pytest tests/ --codspeed
46+
47+
- name: Minimize uv cache
48+
run: uv cache prune --ci

pyproject.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ features = ["pyo3/extension-module"]
3434

3535
[tool.uv]
3636
dev-dependencies = [
37-
"ruff>=0.6.5",
38-
"citiespy>=0.6.3",
39-
"maturin>=1.7.1",
40-
"pytest>=8.3.3",
41-
"pytest-benchmark>=4.0.0",
42-
"pytest-cov>=5.0.0",
43-
"pytest-pretty>=1.2.0",
44-
"pytz>=2024.2",
45-
"tzdata>=2024.1",
46-
"pytest-codspeed>=2.2.1",
37+
"ruff>=0.6.5",
38+
"citiespy>=0.6.3",
39+
"maturin>=1.7.1",
40+
"pytest>=8.3.3",
41+
"pytest-benchmark>=4.0.0",
42+
"pytest-cov>=5.0.0",
43+
"pytest-pretty>=1.2.0",
44+
"pytz>=2024.2",
45+
"tzdata>=2024.1",
46+
"pytest-codspeed>=2.2.1",
4747
]

0 commit comments

Comments
 (0)