-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnoxfile.py
More file actions
27 lines (20 loc) · 779 Bytes
/
noxfile.py
File metadata and controls
27 lines (20 loc) · 779 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
"""Nox sessions for testing across multiple Python versions."""
import nox
nox.options.sessions = ["tests"]
PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
# Use uv for all sessions
nox.options.default_venv_backend = "uv"
# Don't reuse virtual environments - create fresh ones each time
nox.options.reuse_venv = "no"
@nox.session(python=PYTHON_VERSIONS)
def tests(session):
"""Run the test suite against multiple Python versions."""
# Use uv to install dependencies
session.run("uv", "sync", "--active", external=True)
# Run tests
session.run("pytest", "tests/", "-v")
@nox.session(python=PYTHON_VERSIONS)
def lint(session):
"""Run linters across Python versions."""
session.install("ruff")
session.run("ruff", "check", "whai/")