Skip to content

Commit e3d99fb

Browse files
committed
chore: streamline CI with UV and tox-gh-actions
1 parent a018c17 commit e3d99fb

File tree

2 files changed

+6
-38
lines changed

2 files changed

+6
-38
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ jobs:
2020
- '3.11'
2121
- '3.12'
2222
- '3.13'
23-
django-version:
24-
- '4.2'
25-
- '5.0'
26-
- '5.1'
27-
- '5.2'
28-
- 'main'
23+
# anything combinations that do not apply to the whole matrix go in include/exclude
24+
# these are normally only for the oldest and newest python/django versions
2925
include:
3026
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
3127
- python-version: '3.8'
@@ -50,31 +46,11 @@ jobs:
5046
with:
5147
python-version: ${{ matrix.python-version }}
5248

49+
- name: Install uv
50+
uses: hynek/setup-cached-uv@v2
5351

54-
- name: Get pip cache dir
55-
id: pip-cache
56-
run: |
57-
echo "::set-output name=dir::$(pip cache dir)"
58-
59-
- name: Cache
60-
uses: actions/cache@v4
61-
with:
62-
path: ${{ steps.pip-cache.outputs.dir }}
63-
key:
64-
${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
65-
restore-keys: |
66-
${{ matrix.python-version }}-v1-
67-
68-
- name: Install Python dependencies
69-
run: |
70-
python -m pip install --upgrade pip
71-
python -m pip install --upgrade tox tox-gh-actions
72-
73-
- name: Tox tests
74-
run: |
75-
tox -v
76-
env:
77-
DJANGO: ${{ matrix.django-version }}
52+
- name: 🧪 Run tox targets for Python ${{ matrix.python-version }}
53+
run: uvx --with tox-uv --with tox-gh-actions tox -v
7854

7955
- name: Upload coverage
8056
uses: codecov/codecov-action@v5

tox.ini

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ python =
2222
3.13: py313
2323
3.14: py314
2424

25-
[gh-actions:env]
26-
DJANGO =
27-
4.2: dj42
28-
5.0: dj50
29-
5.1: dj51
30-
5.2: dj52
31-
main: djmain
32-
3325
[testenv]
3426
commands =
3527
pytest {posargs}

0 commit comments

Comments
 (0)