Skip to content

Commit

Permalink
add benchmark ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiling-J committed Feb 8, 2023
1 parent 94a70f2 commit 055bb8c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
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 Lint"
run: "poetry run mypy --ignore-missing-imports ."
- 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'

0 comments on commit 055bb8c

Please sign in to comment.