Skip to content

Commit

Permalink
Only store main branch bench results
Browse files Browse the repository at this point in the history
Only store benchmark results from commits to main. This will allow
actual comparisons to PRs to happen.
  • Loading branch information
bennettgoble committed Mar 16, 2023
1 parent 8fdaf68 commit 539df6d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Benchmark

on:
pull_request:
push:
branches: [main]

permissions:
contents: write
Expand All @@ -23,13 +25,14 @@ jobs:
pip install .[dev]
pytest tests/bench.py --benchmark-json benchmark.json
- name: Store results
- name: Report results
uses: benchmark-action/github-action-benchmark@v1
with:
name: Python Benchmarks
tool: pytest
output-file-path: benchmark.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Only update results if they are from main
auto-push: ${{ github.ref == 'refs/heads/main' }}
alert-threshold: "110%"
comment-on-alert: true

0 comments on commit 539df6d

Please sign in to comment.