Skip to content

ci: Continuous Benchmarking #2

ci: Continuous Benchmarking

ci: Continuous Benchmarking #2

Workflow file for this run

on:
pull_request:
types: [opened, reopened, edited, synchronize]
jobs:
benchmark_pr_branch:
name: Continuous Benchmarking PRs with Bencher
# DO NOT REMOVE: For handling Fork PRs see Pull Requests from Forks
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- uses: actions/cache@v2
with:
path: .venv
key: poetry-${{ hashFiles('poetry.lock') }}
- uses: bencherdev/bencher@main
- name: Track PR Benchmarks
run: |
bencher run \
--project pyquil \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ github.head_ref }}' \
--branch-start-point '${{ github.base_ref }}' \
--branch-start-point-hash '${{ github.event.pull_request.base.sha }}' \
--testbed ci-runner-linux \
--err \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--file results.json \
poetry run pytest --benchmark-json results.json test/benchmarks