Merge pull request #148 from finsberg/pre-commit-ci-update-config #150
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: codspeed-benchmarks | |
on: | |
push: | |
branches: | |
- "main" # or "master" | |
pull_request: | |
# `workflow_dispatch` allows CodSpeed to trigger backtest | |
# performance analysis in order to generate initial data. | |
workflow_dispatch: | |
jobs: | |
benchmarks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install package | |
run: python3 -m pip install -e .[benchmark] | |
- name: Run benchmarks | |
uses: CodSpeedHQ/action@v3 | |
with: | |
token: ${{ secrets.CODSPEED_TOKEN }} | |
run: pytest tests/test_benchmarks.py --codspeed --benchmark-warmup-iterations 1 --benchmark-min-rounds 1 --benchmark-calibration-precision 1 |