-
Notifications
You must be signed in to change notification settings - Fork 22
41 lines (36 loc) · 1.5 KB
/
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
name: Github Benchmarks
on: [push] # Can also put pull_request here, but then we dont run it when directly pushing to master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest requests pandas
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest-benchmark
pip install python-sat
pip install z3-solver
pip install exact
pip install pysdd
- name: Benchmark with pytest
run: |
python -m pytest benchmarks/ --benchmark-min-rounds=1 --benchmark-disable-gc --benchmark-verbose --benchmark-json benchmarks/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: benchmarks/output.json
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096
#github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
fail-on-alert: true