Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,29 @@ jobs:
benchmarks:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.13"
allow-prereleases: true

# Temporarily install hardcoded dependencies here.
# Codspeed doesn't work well with tox, as it runs the tox installation process as part of the benchmarking
# process, which is very slow.
- name: Install dependencies
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions
uv venv
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

- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: tox -ecodspeed
run: |
uv run pytest tests/benchmarking/ --codspeed
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ coverage.xml
htmlcov

.benchmarks
.codspeed

# Translations
*.mo
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ setenv =
passenv =
*
usedevelop = false
# Note - these dependencies are duplicated in main.yml, make sure to change them there too.
# TODO: switch to UV for dependency management.
deps =
pytest==7.4.4
pyyaml==6.0.1
pytest-codspeed==2.2.1
pytest-codspeed==3.2.0
Django==5.1.1
commands =
{posargs:pytest --codspeed}
pytest --codspeed {posargs}


[testenv:docs]
Expand Down
Loading