-
-
Notifications
You must be signed in to change notification settings - Fork 64
43 lines (39 loc) · 1.17 KB
/
benchmarks.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
name: Benchmarks
# NOTE: manually disabled on GitHub. Most likely needs work to get running again.
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '* 3 * * *'
workflow_dispatch:
jobs:
benchmark:
defaults:
run:
shell: bash
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: Install project
run: poetry install -E all
- name: Pytest (benchmark)
run: |
poetry run pytest tests/test_benchmarks.py --benchmark-enable --benchmark-json output.json
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
tool: 'pytest'
output-file-path: output.json
# push to gh-page
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '150%'
comment-on-alert: true
fail-on-alert: true