Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update python-bench.yml #534

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/python-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ on:
- main

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write

jobs:
Expand All @@ -32,30 +30,26 @@ jobs:
working-directory: ./bindings/python
run: |
pip install -U pip
pip install .[dev]
pip install -r requirements.txt

- name: Run tests
working-directory: ./bindings/python
run: |
cargo test
pytest --benchmark-json output.json benches/
# Download previous benchmark result from cache (if exists)

- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark
# Run `github-action-benchmark` action

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
# What benchmark tool the output.txt came from
tool: 'pytest'
# Where the output from the benchmark tool is stored
output-file-path: ./bindings/python/output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true
comment-on-alert: true
# Mention @rhysd in the commit comment
alert-comment-cc-users: '@Narsil'