add close method (#19) #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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' |