Skip to content

Commit 52dc1f8

Browse files
committed
Don't run codspeed using tox
1 parent c5e7f1b commit 52dc1f8

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,27 @@ jobs:
5858
steps:
5959
- uses: actions/checkout@v4
6060

61-
- uses: actions/setup-python@v5
61+
- name: Install uv
62+
uses: astral-sh/setup-uv@v5
63+
64+
- name: Setup python
65+
uses: actions/setup-python@v5
6266
with:
6367
python-version: "3.13"
6468
allow-prereleases: true
6569

70+
# Temporarily install hardcoded dependencies here.
71+
# Codspeed doesn't work well with tox, as it runs the tox installation process as part of the benchmarking
72+
# process, which is very slow.
6673
- name: Install dependencies
6774
run: |
6875
python -VV
69-
python -m site
70-
python -m pip install --upgrade pip setuptools wheel
71-
python -m pip install --upgrade tox tox-gh-actions
76+
uv venv
77+
uv pip install pytest==7.4.4 pyyaml==6.0.1 pytest-codspeed==3.2.0 Django==5.1.1 /home/runner/work/grimp/grimp
7278
7379
- name: Run benchmarks
7480
uses: CodSpeedHQ/action@v3
7581
with:
7682
token: ${{ secrets.CODSPEED_TOKEN }}
77-
run: tox -ecodspeed
83+
run: |
84+
uv run pytest tests/benchmarking/ --codspeed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ coverage.xml
3535
htmlcov
3636

3737
.benchmarks
38+
.codspeed
3839

3940
# Translations
4041
*.mo

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,15 @@ setenv =
7171
passenv =
7272
*
7373
usedevelop = false
74+
# Note - these dependencies are duplicated in main.yml, make sure to change them there too.
75+
# TODO: switch to UV for dependency management.
7476
deps =
7577
pytest==7.4.4
7678
pyyaml==6.0.1
7779
pytest-codspeed==3.2.0
7880
Django==5.1.1
7981
commands =
80-
{posargs:pytest --codspeed}
82+
pytest --codspeed {posargs}
8183

8284

8385
[testenv:docs]

0 commit comments

Comments
 (0)