|
12 | 12 |
|
13 | 13 | def install_deps(s: nox.Session, groups: list[str]) -> None: |
14 | 14 | s.env["UV_PROJECT_ENVIRONMENT"] = s.virtualenv.location |
15 | | - cmd = ["uv", "sync", "--frozen", "--all-extras"] |
| 15 | + cmd = ["uv", "sync", "--frozen"] |
| 16 | + cmd.append("--no-dev") |
16 | 17 | for g in groups: |
17 | 18 | cmd.extend(("--group", g)) |
18 | 19 | _ = s.run_install(*cmd) |
19 | 20 |
|
20 | 21 |
|
21 | | -@nox.session(python=ALL_PYTHON) |
22 | | -def test(s: nox.Session) -> None: |
23 | | - install_deps(s, []) |
| 22 | +@nox.session(reuse_venv=True, default=False) |
| 23 | +def check(s: nox.Session) -> None: |
| 24 | + install_deps(s, ["test", "typing", "lint"]) |
| 25 | + _ = s.run("ruff", "format") |
| 26 | + _ = s.run("ruff", "check", "--fix") |
| 27 | + _ = s.run("ruff", "format") |
24 | 28 | _ = s.run("pytest") |
| 29 | + _ = s.run("mypy") |
| 30 | + _ = s.run("basedpyright", "--venvpath", s.virtualenv.location) |
25 | 31 |
|
26 | 32 |
|
27 | 33 | @nox.session(python=ALL_PYTHON) |
| 34 | +def test(s: nox.Session) -> None: |
| 35 | + install_deps(s, ["test"]) |
| 36 | + _ = s.run("pytest", "--runslow") |
| 37 | + |
| 38 | + |
| 39 | +@nox.session |
28 | 40 | def type_check(s: nox.Session) -> None: |
29 | | - install_deps(s, ["type-checking", "examples"]) |
| 41 | + install_deps(s, ["typing", "examples"]) |
30 | 42 | _ = s.run("mypy", ".") |
31 | 43 | _ = s.run("basedpyright", "--venvpath", s.virtualenv.location, ".") |
32 | 44 |
|
33 | 45 |
|
34 | 46 | @nox.session |
35 | 47 | def lint(s: nox.Session) -> None: |
36 | 48 | install_deps(s, ["lint"]) |
37 | | - _ = s.run("ruff", "check", ".") |
38 | | - _ = s.run("ruff", "format", "--check", ".") |
| 49 | + _ = s.run("ruff", "check") |
| 50 | + _ = s.run("ruff", "format", "--check") |
39 | 51 |
|
40 | 52 |
|
41 | 53 | @nox.session |
|
0 commit comments