Update the Metropolis-within-Gibbs example #216
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Benchmarks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
benchmark: | |
name: Run benchmarks | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.10' ] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up benchmark environment | |
run: | | |
python -m pip install -U pip | |
pip install -r requirements.txt | |
- name: Load previous benchmark data from cache | |
uses: actions/cache@v3 | |
with: | |
path: ./benchmark-cache | |
key: benchmark | |
- name: Run benchmarks | |
run: | | |
pytest --benchmark-only --benchmark-json output.json | |
- name: Write benchmark results | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: Python Benchmark with pytest-benchmark | |
tool: 'pytest' | |
output-file-path: output.json | |
external-data-json-path: ./benchmark-cache/benchmark-data.json | |
alert-threshold: '200%' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
comment-on-alert: ${{ github.event_name == 'push' }} | |
fail-on-alert: true | |
auto-push: false |