-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnoxfile.py
More file actions
33 lines (23 loc) · 895 Bytes
/
noxfile.py
File metadata and controls
33 lines (23 loc) · 895 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
"""Nox configuration for Prezo."""
from __future__ import annotations
import nox
PYTHON_VERSIONS = ["3.12", "3.13", "3.14"]
nox.options.default_venv_backend = "uv"
nox.options.reuse_existing_virtualenvs = True
nox.options.sessions = ["check", "test"]
@nox.session(python=PYTHON_VERSIONS)
def test(session: nox.Session) -> None:
"""Run the test suite."""
session.run("uv", "sync", "-q", "--active", external=True)
session.run("pytest", "tests", *session.posargs)
@nox.session
def check(session: nox.Session) -> None:
"""Run all checks (lint, typecheck, tests)."""
session.run("uv", "sync", "-q", "--active", external=True)
# Lint
session.run("ruff", "check", "src", "tests")
session.run("ruff", "format", "--check", ".")
# Type check
# session.run("mypy", "src")
session.run("ty", "check", "src")
# session.run("pyrefly", "check", "src")