11import nox
22
3- nox .options .default_venv_backend = "uv|venv "
3+ nox .options .default_venv_backend = "uv"
44
55
6- @nox .session (python = ["3.9" , "3.10" , "3.11" , "3.12" , "3.13" ])
6+ @nox .session (python = ["3.9" , "3.10" , "3.11" , "3.12" , "3.13" ], venv_backend = "uv" )
77def run_cli (session ):
88 """Make sure the CLI runs correctly"""
9- session .install ("." )
9+ session .run_install (
10+ "uv" ,
11+ "sync" ,
12+ f"--python={ session .virtualenv .location } " ,
13+ env = {"UV_PROJECT_ENVIRONMENT" : session .virtualenv .location },
14+ )
1015 session .run ("dbt-autofix" , "--help" )
1116
1217
13- @nox .session (python = ["3.13" ])
18+ @nox .session (python = ["3.13" ], venv_backend = "uv" )
1419def check_latest_schema (session ):
1520 """Make sure the CLI runs correctly"""
16- session .install ("." )
21+ session .run_install (
22+ "uv" ,
23+ "sync" ,
24+ f"--python={ session .virtualenv .location } " ,
25+ env = {"UV_PROJECT_ENVIRONMENT" : session .virtualenv .location },
26+ )
1727 session .run ("dbt-autofix" , "print-fields-matrix" )
1828
1929
20- @nox .session (python = ["3.9" , "3.10" , "3.11" , "3.12" , "3.13" ])
30+ @nox .session (python = ["3.9" , "3.10" , "3.11" , "3.12" , "3.13" ], venv_backend = "uv" )
2131def pytest (session ):
2232 """Run the tests"""
23- session .install (".[test]" )
24- session .run ("pytest" )
33+ session .run_install (
34+ "uv" ,
35+ "sync" ,
36+ "--extra=test" ,
37+ f"--python={ session .virtualenv .location } " ,
38+ env = {"UV_PROJECT_ENVIRONMENT" : session .virtualenv .location },
39+ )
40+ session .run ("pytest" , * session .posargs )
41+
42+
43+ @nox .session (python = ["3.9" , "3.10" , "3.11" , "3.12" , "3.13" ], venv_backend = "uv" )
44+ def run_cli_deprecations (session ):
45+ """Make sure the deperecations CLI runs (but fails)"""
46+ session .run_install (
47+ "uv" ,
48+ "sync" ,
49+ f"--python={ session .virtualenv .location } " ,
50+ env = {"UV_PROJECT_ENVIRONMENT" : session .virtualenv .location },
51+ )
52+ session .run ("dbt-autofix" , "deprecations" )
0 commit comments