forked from histolab/histolab
-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (38 loc) · 1.28 KB
/
benchmarks.yml
File metadata and controls
38 lines (38 loc) · 1.28 KB
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
name: Python Benchmarks
on:
push:
branches:
- master
jobs:
benchmark:
runs-on: ubuntu-latest
if: ${{ github.repository }} == 'histolab/histolab'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: Run Benchmarks
run: |
sudo apt install -y openslide-tools
pip install numpy pytest pytest-benchmark requests
pip install -e .
pytest tests/benchmarks/test_benchmarks.py --benchmark-json output.json
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: Python Benchmark with pytest-benchmark
tool: 'pytest'
output-file-path: output.json
# Personal access token to deploy GitHub Pages branch
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true
fail-on-alert: true
comment-on-alert: true
alert-comment-cc-users: '@ernestoarbitrio'
alert-threshold: '300%'