From 6cad6828315c000ca2707a879e9fcd74e6777a23 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Thu, 17 Oct 2024 20:05:27 +0200 Subject: [PATCH] Actually skip requirements install in docs job --- .github/workflows/docs-action.yml | 2 +- noxfile.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-action.yml b/.github/workflows/docs-action.yml index c7990ea..c13bb17 100644 --- a/.github/workflows/docs-action.yml +++ b/.github/workflows/docs-action.yml @@ -30,7 +30,7 @@ jobs: - name: Build Docs env: - SKIP_REQUIREMENTS_INSTALL: true + SKIP_REQUIREMENTS_INSTALL: '1' run: | nox --force-color -e docs diff --git a/noxfile.py b/noxfile.py index d1ffe0b..477cd3e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,5 +1,6 @@ import os import shutil +from importlib import metadata from pathlib import Path import nox @@ -8,6 +9,13 @@ SKIP_REQUIREMENTS_INSTALL = os.environ.get("SKIP_REQUIREMENTS_INSTALL", "0") == "1" +nox.options.reuse_existing_virtualenvs = True + +# Speed up all sessions by using uv if possible +if tuple(map(int, metadata.version("nox").split("."))) >= (2024, 3): + nox.options.default_venv_backend = "uv|virtualenv" + + def _install(session, *args): if SKIP_REQUIREMENTS_INSTALL: return