Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ on:

env:
PYTHON_VERSION: "3.12"
SHARDS: 4

jobs:
benchmarks-instrumentation:
strategy:
matrix:
include:
- mode: "instrumentation"
runs-on: ubuntu-24.04
- mode: "walltime"
runs-on: codspeed-macro
shard: [1, 2, 3, 4]
mode: ["instrumentation", "walltime"]

name: Run ${{ matrix.mode }} benchmarks
runs-on: ${{ matrix.runs-on }}
name: "Run ${{ matrix.mode }} benchmarks (Shard #${{ matrix.shard }})"
runs-on: ${{ matrix.mode == 'instrumentation' && 'ubuntu-24.04' || 'codspeed-macro' }}
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install required-version defined in uv.toml
uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install local version of pytest-codspeed
run: |
sudo apt-get update
sudo apt-get install valgrind -y
pip install .
uv sync --dev
sudo apt-get remove valgrind -y
- name: Run benchmarks
uses: CodSpeedHQ/action@main
with:
run: pytest tests/benchmarks/ --codspeed
run: uv run pytest tests/benchmarks/ --codspeed --test-group=${{ matrix.shard }} --test-group-count=${{ env.SHARDS }}
token: ${{ secrets.CODSPEED_TOKEN }}
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,24 @@ dependencies = [
]

[project.optional-dependencies]
lint = ["mypy ~= 1.11.2", "ruff ~= 0.6.5"]
compat = [
"pytest-benchmark ~= 5.0.0",
"pytest-xdist ~= 3.6.1",
# "pytest-speed>=0.3.5",
]
test = ["pytest ~= 7.0", "pytest-cov ~= 4.0.0"]

[tool.uv.sources]
pytest-codspeed = { workspace = true }

[dependency-groups]
dev = ["pytest-codspeed"]
dev = [
"pytest-codspeed",
"mypy ~= 1.11.2",
"ruff ~= 0.6.5",
"pytest ~= 7.0",
"pytest-cov ~= 4.0.0",
"pytest-test-groups>=1.1.0",
]

[project.entry-points]
pytest11 = { codspeed = "pytest_codspeed.plugin" }
Expand Down
38 changes: 25 additions & 13 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.