-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.06 KB
/
main_benchmark.yml
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
name: Main Benchmark
on:
push:
branches:
- main
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Run pytest-benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Setup dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install uv
uv pip compile --extra=dev pyproject.toml -o requirements.txt
uv pip sync requirements.txt
- run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Run benchmark
run: pytest --benchmark-only --benchmark-json output.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Python Benchmark with pytest-benchmark
tool: 'pytest'
output-file-path: output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true