-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathnoxfile.py
More file actions
36 lines (32 loc) · 893 Bytes
/
Copy pathnoxfile.py
File metadata and controls
36 lines (32 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# https://github.com/wntrblm/nox/
# Documentation: https://nox.thea.codes/
#
import nox
from nox.sessions import Session
PYTHON_VERSIONS = ('3.14', '3.13', '3.12')
DJANGO_VERSIONS = ('6.1', '6.0', '5.2')
@nox.session(
python=PYTHON_VERSIONS,
venv_backend='uv',
download_python='auto',
)
@nox.parametrize('django', DJANGO_VERSIONS)
def tests(session: Session, django: str):
session.install('uv')
session.run(
'uv',
'sync',
'--all-extras',
'--python',
session.python,
env={'UV_PROJECT_ENVIRONMENT': session.virtualenv.location},
)
session.run(
'uv',
'pip',
'install',
f'django>={django},<={django}.999',
env={'UV_PROJECT_ENVIRONMENT': session.virtualenv.location},
)
session.run('python', '-m', 'coverage', 'run', '--context', f'py{session.python}-django{django}')