From 3bc35ad669039ca9524e4c0dd8d3eb27dc7de590 Mon Sep 17 00:00:00 2001 From: Furechan Date: Wed, 18 Sep 2024 14:18:11 +0800 Subject: [PATCH] Added noxfile.py --- tox.ini => archive/tox.ini | 0 noxfile.py | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+) rename tox.ini => archive/tox.ini (100%) create mode 100644 noxfile.py diff --git a/tox.ini b/archive/tox.ini similarity index 100% rename from tox.ini rename to archive/tox.ini diff --git a/noxfile.py b/noxfile.py new file mode 100644 index 0000000..4d788a4 --- /dev/null +++ b/noxfile.py @@ -0,0 +1,22 @@ +import os +import nox +import tempfile + +VERSIONS = ["3.9", "3.10", "3.11", "3.12"] + +ENVDIR = os.path.join(tempfile.gettempdir(), "nox") + +nox.options.envdir = ENVDIR +nox.options.default_venv_backend = "uv" + + +@nox.session(python=VERSIONS) +def tests(session: nox.Session): + session.install(".", "pytest") + session.run("pytest") + + +@nox.session() +def lint(session: nox.Session): + session.install("ruff") + session.run("ruff", "check")