diff --git a/.github/workflows/generate_version_switcher.yml b/.github/workflows/generate_version_switcher.yml index 18030f290..0eb7358f3 100644 --- a/.github/workflows/generate_version_switcher.yml +++ b/.github/workflows/generate_version_switcher.yml @@ -5,8 +5,6 @@ on: workflows: ["build_and_publish_docs"] types: - completed - tags: - - v[0-9]+.[0-9]+.[0-9]+ workflow_dispatch: concurrency: diff --git a/pyproject.toml b/pyproject.toml index c50de088e..d8efaadd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -210,6 +210,7 @@ markers = [ "no_coverage: tests that either cannot run inside the `coverage` workflow or do not affect coverage stats", "all: reserved by allow-skip", "none: reserved by allow-skip", + "needs_dependencies: marks tests as requiring poetry.lock dependencies to run" ] asyncio_mode = "auto" diff --git a/scripts/test.py b/scripts/test.py index 2925592eb..9797f336e 100644 --- a/scripts/test.py +++ b/scripts/test.py @@ -47,6 +47,8 @@ def _test(coverage: bool = False, dependencies: bool = False, quick: bool = Fals ] else: args = [ + "-m", + "not needs_dependencies", "--allow-skip=all", *args, ] diff --git a/tests/tutorials/test_tutorials.py b/tests/tutorials/test_tutorials.py index f86f244fa..e833608b6 100644 --- a/tests/tutorials/test_tutorials.py +++ b/tests/tutorials/test_tutorials.py @@ -15,6 +15,7 @@ CHATSKY_TUTORIAL_PY_FILES = map(str, (PROJECT_ROOT_DIR / "tutorials").glob("./**/*.py")) +@pytest.mark.needs_dependencies def check_tutorial_dependencies(venv: "VirtualEnv", tutorial_source_code: str): """ Install dependencies required by a tutorial in `venv` and run the tutorial. @@ -35,7 +36,7 @@ def check_tutorial_dependencies(venv: "VirtualEnv", tutorial_source_code: str): versions_dict = InstallationCell.versions() for deps in re.findall(InstallationCell.pattern, tutorial_source_code): venv.run( - f"python -m pip install {deps}".replace("chatsky=={chatsky}", ".").format(**versions_dict), + f"python -m pip install {deps}".replace("chatsky", ".").format(**versions_dict), check_rc=True, cd=os.getcwd(), )