Skip to content

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Benchmark
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- uses: bencherdev/bencher@main
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Build with hatch
run: uv build
- name: Run benchmarks
run: uv run pytest --benchmark-json=results.json
- name: Upload benchmark data
run: |
bencher run \
--project image-interpolation \
--adapter python_pytest \
--file ./results.json \
--token '${{ secrets.BENCHER_API_TOKEN }}'
--testbed ubuntu-latest \
--github-actions '${{ secrets.GITHUB_TOKEN }}'