Skip to content

Commit

Permalink
Create benchmark.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti authored Sep 19, 2024
1 parent df28248 commit cbdeacc
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Run performance benchmark
on:
pull_request:
types:
- labeled
- synchronize
workflow_dispatch:

permissions:
contents: write
deployments: write

jobs:
benchmark:
if: contains(github.event.label.name, 'benchmark') || github.event_name == 'workflow_dispatch'
name: Run pytest-benchmark with pixi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup pixi environment
uses: prefix-dev/[email protected]
with:
pixi-version: v0.29.0
cache: true
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}

- name: Run benchmark
run: pixi run benchmark

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Python Benchmark with pytest-benchmark
tool: 'pytest'
output-file-path: tests/output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true

0 comments on commit cbdeacc

Please sign in to comment.