Update dependencies (#123) #126
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: | |
# Run on pushes to the main branch | |
push: | |
branches: | |
- "main" | |
# Run on pull requests | |
pull_request: | |
branches: | |
- "main" | |
# `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@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Cache poetry | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-python-3.10 | |
- run: poetry --version | |
- name: Install dependencies | |
run: poetry install --all-extras | |
- name: Run benchmarks | |
uses: CodSpeedHQ/action@v2 | |
with: | |
run: "poetry run pytest tests/benchmarks/ --codspeed" |