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
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- uses: bencherdev/bencher@main
- name: Install Hatch
uses: pypa/hatch@install
- name: Build with hatch
run: hatch build
- name: Benchmark with bencher and pytest
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 }}' \
"hatch run pytest"