Skip to content

Commit

Permalink
add github-action-benchmark (#504)
Browse files Browse the repository at this point in the history
* add github-action-benchmark

* edit action name
  • Loading branch information
vincentsarago authored Jul 27, 2022
1 parent a4dab4d commit c6b097a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,22 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('./tests/benchmarks/__init__.py') }}

- name: Run Benchmark
run: python -m pytest --benchmark-only --benchmark-autosave --benchmark-columns 'min, max, mean, median' --benchmark-sort 'min'
run: python -m pytest --benchmark-only --benchmark-autosave --benchmark-columns 'min, max, mean, median' --benchmark-sort 'min' --benchmark-json output.json

- name: Store and Compare benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: rio-tiler Benchmarks
tool: 'pytest'
output-file-path: output.json
alert-threshold: '130%'
comment-on-alert: true
fail-on-alert: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Make a commit on `gh-pages` only if master
auto-push: ${{ github.ref == 'refs/heads/master' }}
benchmark-data-dir-path: benchmarks

publish:
needs: [tests]
Expand Down

0 comments on commit c6b097a

Please sign in to comment.