Skip to content

Commit

Permalink
Update tox to use tox-uv
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Dec 25, 2024
1 parent 2ba6c82 commit 274ebd8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
- run: uv pip install tox
- run: uv pip install tox tox-uv
- run: tox -e ${{ matrix.tox }}
if: ${{ ! matrix.coverage }}
- run: tox -e ${{ matrix.tox }} -- --cov-report=xml
Expand Down
28 changes: 14 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ envlist = py312, docs, ruff-format, ruff-lint, mypy
skipsdist = true

[testenv]
allowlist_externals = poetry
runner = uv-venv-lock-runner
dependency_groups = dev
setenv =
DJANGO_SECRET_KEY=test-only-s3cret
commands =
poetry install
poetry run python -m pytest \
uv run pytest \
--basetemp={envtmpdir} \
--cov=comics --cov-report=term-missing \
{posargs}

[testenv:docs]
changedir = docs
commands =
python -m pip install -r requirements.txt
python -m sphinx -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
uv pip install -r requirements.txt
uv run sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

[testenv:ruff-format]
commands =
poetry install
poetry run python -m ruff format --check
runner = uv-venv-lock-runner
dependency_groups = dev
commands = uv run ruff format --check

[testenv:ruff-lint]
commands =
poetry install
poetry run python -m ruff check
runner = uv-venv-lock-runner
dependency_groups = dev
commands = uv run ruff check

[testenv:mypy]
commands =
poetry install
poetry run python -m mypy comics
runner = uv-venv-lock-runner
dependency_groups = dev
commands = uv run mypy comics

0 comments on commit 274ebd8

Please sign in to comment.