@@ -8,78 +8,66 @@ concurrency:
88
99jobs :
1010 test-package :
11- name : Test Package (Python ${{ matrix.python- version }}, Django ${{ matrix.django- version }})
11+ name : Test Package (Python ${{ matrix.python. version }}, Django ${{ matrix.django. version }})
1212 runs-on : ubuntu-latest
1313 permissions :
1414 id-token : write # Required for Codecov OIDC token
1515 strategy :
1616 fail-fast : false
1717 matrix :
18- python-version :
19- - ' 3.10'
20- - ' 3.11'
21- - ' 3.12'
22- - ' 3.13'
23- django-version :
24- - ' 4.2'
25- - ' 5.0'
26- - ' 5.1'
27- - ' 5.2'
28- - ' main'
18+ # needs to included every supported python version
19+ python :
20+ - { version: '3.10', toxenv: 'py310' }
21+ - { version: '3.11', toxenv: 'py311' }
22+ - { version: '3.12', toxenv: 'py312' }
23+ - { version: '3.13', toxenv: 'py313' }
24+ django :
25+ - {version: '4.2', toxenv: 'dj42'}
26+ - {version: '5.0', toxenv: 'dj50'}
27+ - {version: '5.1', toxenv: 'dj51'}
28+ - {version: '5.2', toxenv: 'dj52'}
29+ - {version: 'main', toxenv: 'djmain'}
2930 include :
30- # https://docs.djangoproject.com/en/dev/faq/install/#what-python-version- can-i-use-with-django
31- - python- version : ' 3.8'
32- django- version : ' 4.2'
33- - python- version : ' 3.9'
34- django- version : ' 4.2'
35- - python- version : ' 3.14'
36- django- version : ' 5.2'
37- - python- version : ' 3.14'
38- django- version : ' main'
31+ # https://docs.djangoproject.com/en/dev/faq/install/#what-python-can-i-use-with-django
32+ - python : { version: '3.8', toxenv: 'py38' }
33+ django : { version: '4.2', toxenv: 'dj42' }
34+ - python : { version: '3.9', toxenv: 'py39' }
35+ django : { version: '4.2', toxenv: 'dj42' }
36+ - python : { version: '3.14', toxenv: 'py314' }
37+ django : { version: '5.2', toxenv: 'dj52' }
38+ - python : { version: '3.14', toxenv: 'py314' }
39+ django : { version: 'main', toxenv: 'djmain' }
3940 exclude :
40- - python-version : ' 3.13'
41- django-version : ' 5.0'
42- - python-version : ' 3.13'
43- django-version : ' 4.2'
41+ - python : { version: '3.13', toxenv: 'py313' }
42+ django : { version: '5.0', toxenv: 'dj50' }
43+ - python : { version: '3.13', toxenv: 'py313' }
44+ django : { version: '4.2', toxenv: 'dj42' }
45+ - python : { version: '3.10', toxenv: 'py310' }
46+ django : { version: 'main', toxenv: 'djmain' }
47+ - python : { version: '3.11', toxenv: 'py311' }
48+ django : { version: 'main', toxenv: 'djmain' }
4449
4550 steps :
4651 - uses : actions/checkout@v4
4752
48- - name : Set up Python ${{ matrix.python- version }}
53+ - name : Set up Python ${{ matrix.python. version }}
4954 uses : actions/setup-python@v5
5055 with :
51- python-version : ${{ matrix.python- version }}
56+ python-version : ${{ matrix.python. version }}
5257
58+ - name : Install uv
59+ uses : hynek/setup-cached-uv@v2
5360
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 }}
78-
61+ - name : 🧪 Run tox targets for Python ${{ matrix.python.version }}, Django ${{ matrix.django.version }}
62+ # we are not using tox-gh-actions to run our tests because it runs the tests for the django versions
63+ # in sequence rather than in parallel, which slows down the test suite significantly. We use the matrix
64+ # feature of GitHub Actions to run the tests in parallel instead.
65+ run : uvx --with tox-uv tox -v -e ${{ matrix.python.toxenv }}-${{ matrix.django.toxenv }}
66+
7967 - name : Upload coverage
8068 uses : codecov/codecov-action@v5
8169 with :
82- name : Python ${{ matrix.python- version }}
70+ name : Python ${{ matrix.python.version }}, Django ${{ matrix.django. version }}
8371 use_oidc : true
8472
8573 test-demo-rp :
0 commit comments