-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (42 loc) · 1.35 KB
/
bench.yaml
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
46
---
name: Benchmarks
on:
push:
branches:
- main
jobs:
benchmarks:
name: "Benchmark theine"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "3.11"
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
version: 1.3
- name: Setup Poetry
run: "poetry config virtualenvs.in-project true"
- name: Cache Deps
uses: actions/cache@v2
id: cached-poetry-dependencies
with:
path: .venv
key: python-3.11-pydeps-${{ hashFiles('**/poetry.lock') }}
- name: "Install Dependencies"
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: "poetry install --no-interaction --no-root"
- name: "Run Benchmarks"
run: "poetry run pytest benchmarks/benchmark_test.py --benchmark-only --benchmark-json output.json"
- name: "Publish Benchmark Result"
uses: benchmark-action/github-action-benchmark@v1
with:
name: 'Cacheme Benchmark: theine'
tool: 'pytest'
output-file-path: output.json
github-token: ${{ secrets.BENCH_TOKEN }}
auto-push: true
gh-repository: 'github.com/Yiling-J/cacheme-benchmark'
benchmark-data-dir-path: 'dev/theine'