Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Codspeed profiling Actions workflow. #8054

Merged
merged 9 commits into from Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/codspeed.yml
@@ -0,0 +1,32 @@
name: codspeed

on:
push:
branches:
- main
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
codspeed-profiling:
name: codspeed profiling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pdm-project/setup-pdm@v3
with:
python-version: '3.10'
cache: true

- name: install deps
run: |
pdm venv create --with-pip --force $PYTHON
pdm install -G testing -G testing-extra -G email

- name: Run CodSpeed benchmarks
uses: CodSpeedHQ/action@v1
with:
run: pdm run pytest ./tests/benchmarks --codspeed
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -102,6 +102,7 @@ testing = [
"pytest-examples",
"faker>=18.13.0",
"pytest-benchmark>=4.0.0",
"pytest-codspeed~=2.2.0",
]
testing-extra = [
# used when generate devtools docs example
Expand Down