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
4 changes: 3 additions & 1 deletion .github/workflows/codspeed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:

- name: Run CodSpeed
uses: CodSpeedHQ/action@v4
env:
PYTEST_ADDOPTS: "-c benchmarks/pytest-codspeed.ini"
with:
mode: instrumentation
run: pytest --codspeed -k "test_faster_" benchmarks/
run: pytest
4 changes: 4 additions & 0 deletions benchmarks/pytest-codspeed.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
addopts = --codspeed -k "test_faster_"
testpaths =
benchmarks
Comment on lines +3 to +4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix testpaths so CodSpeed collects benchmarks

Because the workflow now runs pytest with -c benchmarks/pytest-codspeed.ini, pytest sets its rootdir to the directory containing that config. With testpaths = benchmarks here, collection resolves to benchmarks/benchmarks, which does not exist in this repo, so CodSpeed will collect zero tests and the benchmark run silently does nothing. To ensure benchmarks run, make testpaths relative to the config directory (e.g., .) or drop testpaths and pass the path explicitly.

Useful? React with 👍 / 👎.

Loading