-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
41 lines (32 loc) · 698 Bytes
/
Copy pathnoxfile.py
File metadata and controls
41 lines (32 loc) · 698 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
37
38
39
40
41
"""Testing with Nox."""
import nox
nox.options.default_venv_backend = "uv|virtualenv"
UV_RUN = (
"uv",
"run",
"--active", # Ensures that uv uses the virtualenv created by nox, not the project's venv
)
@nox.session(python="3.9")
def type_checking(session):
"""Run type checking."""
session.run(
*UV_RUN,
"mypy",
"src",
)
@nox.session(python="3.9")
def lint(session):
"""Run linting."""
session.run(
*UV_RUN,
"ruff",
"check",
".",
)
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"])
def tests(session):
"""Run unit tests."""
session.run(
*UV_RUN,
"pytest",
)