Skip to content

Commit

Permalink
updates tox and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Oct 10, 2024
1 parent b85747f commit bd528b1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ jobs:
- name: Test
# if: needs.changes.outputs.run_tests
run: |
uv add "django==${{ matrix.django-version }}.*"
uv run --cache-dir .cache-uv/ \
uv export -q --no-hashes -o requirements.txt
pip install -r requirements.txt
pip install "django==${{ matrix.django-version }}.*"
python -m pytest tests/ \
--junit-xml junit-${{ matrix.python-version }}-${{matrix.django-version}}.xml \
--cov --cov-report xml
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ classifiers=[
]

dependencies = [
"django>=4,<6",
]
[project.urls]
Homepage = "https://github.com/saxix/django-admin-extra-buttonst"
Expand Down Expand Up @@ -49,5 +48,4 @@ dev-dependencies = [
"flake8>=7.1.1",
"black>=24.10.0",
"pdbpp>=0.10.3",
"tox-uv>=1.13.0"
]
21 changes: 12 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,34 @@ skip_missing_interpreters = true
;skipsdist = true

[testenv]
skip_install = false
skip_install = true
passenv =
PYTHONDONTWRITEBYTECODE
PGHOST
PGPORT

allowlist_externals =
sh
deps =
uv

;allowlist_externals =
; uv
; sh

changedir={toxinidir}
setenv =
d42: DJANGO = django>=4,<5
d51: DJANGO = django>=5,<6
d42: DJANGO = django==4.2.*
d51: DJANGO = django==5.1.*
d42: LOCK = "uv4.lock"
d51: LOCK = "uv5.lock"

extras =
dev

commands =
sh -c "echo '{env:DJANGO}' > {work_dir}/overrides.txt"
uv export -q --no-hashes -o {work_dir}/requirements.txt
uv -q pip install -r {work_dir}/requirements.txt --override {work_dir}/overrides.txt
uv add -q --dev '{env:DJANGO}'
uv run pytest tests
pip install -r {work_dir}/requirements.txt
pip install '{env:DJANGO}'
pytest


[testenv:lint]
Expand Down

0 comments on commit bd528b1

Please sign in to comment.