-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (38 loc) · 1.17 KB
/
benchmark-report.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
45
name: Benchmark
# Do not run this workflow on pull request since this workflow has permission to modify contents.
on:
push:
branches:
- main
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
name: Report benchmarks on gh-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache-dependency-path: "pyproject.toml"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -e .[test]
- name: Run benchmark
run: |
pytest tests/bench.py --benchmark-json output.json
- name: Store benchmark results
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