Skip to content

Merge pull request #139 from Janelia-Trackathon-2023/fix-matcher-for-… #34

Merge pull request #139 from Janelia-Trackathon-2023/fix-matcher-for-…

Merge pull request #139 from Janelia-Trackathon-2023/fix-matcher-for-… #34

name: Benchmark
# Do not run this workflow on pull request since this workflow has permission to modify contents.
on:
push:
branches:
- main
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
name: Report benchmarks on gh-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache-dependency-path: "pyproject.toml"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -e .[test]
- name: Run benchmark
run: |
pytest tests/bench.py --benchmark-json output.json
- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
name: Python Benchmark with pytest-benchmark
tool: 'pytest'
output-file-path: output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true