Skip to content

Commit

Permalink
Add pytest-benchmark (#1720)
Browse files Browse the repository at this point in the history
* Add pytest-benchmark

* Add pytest-benchmark

* Add pytest-benchmark

* Add pytest-benchmark

* Add pytest-benchmark

* Add pytest-benchmark

* Add pytest-benchmark

* Add pytest-benchmark

* Add pytest-benchmark

* Add pytest-benchmark

* Update pydantic
  • Loading branch information
koxudaxi authored Nov 21, 2023
1 parent cb5c66c commit 811cb85
Show file tree
Hide file tree
Showing 4 changed files with 338 additions and 47 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: codspeed-benchmarks

on:
push:
branches:
- "main"
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@v3
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-path: .venv
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-codspeed-3.12-v1-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction

- name: Run benchmarks
uses: CodSpeedHQ/action@v1
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: poetry run pytest tests/ --codspeed -n auto
Loading

0 comments on commit 811cb85

Please sign in to comment.