From 98f05d7064a7f10ad94a3d39c4bf300a18f31021 Mon Sep 17 00:00:00 2001 From: Josef Prochazka Date: Mon, 1 Dec 2025 09:32:27 +0100 Subject: [PATCH 1/3] Add CLI version to e2e tests --- tests/e2e/project_template/test_static_crawlers_templates.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/e2e/project_template/test_static_crawlers_templates.py b/tests/e2e/project_template/test_static_crawlers_templates.py index 07b3b11705..cb951587e0 100644 --- a/tests/e2e/project_template/test_static_crawlers_templates.py +++ b/tests/e2e/project_template/test_static_crawlers_templates.py @@ -71,6 +71,9 @@ async def test_static_crawler_actor_at_apify( project_path=tmp_path / actor_name, wheel_path=crawlee_wheel_path, package_manager=package_manager ) + # Print apify version for debugging purposes in rare cases of CLI failures + subprocess.run(['apify', '--version'], check=True) # noqa: ASYNC221, S607 + # Build actor using sequence of cli commands as the user would subprocess.run( # noqa: ASYNC221, S603 ['apify', 'login', '-t', os.environ['APIFY_TEST_USER_API_TOKEN']], # noqa: S607 From 8203733979b4ce3be9d4392652a1f7bcd51f5cfc Mon Sep 17 00:00:00 2001 From: Josef Prochazka Date: Mon, 1 Dec 2025 10:05:33 +0100 Subject: [PATCH 2/3] Test it --- tests/e2e/project_template/test_static_crawlers_templates.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/project_template/test_static_crawlers_templates.py b/tests/e2e/project_template/test_static_crawlers_templates.py index cb951587e0..46bedb9e45 100644 --- a/tests/e2e/project_template/test_static_crawlers_templates.py +++ b/tests/e2e/project_template/test_static_crawlers_templates.py @@ -73,6 +73,7 @@ async def test_static_crawler_actor_at_apify( # Print apify version for debugging purposes in rare cases of CLI failures subprocess.run(['apify', '--version'], check=True) # noqa: ASYNC221, S607 + raise RuntimeError('Just to see if the cli version is printed') # Build actor using sequence of cli commands as the user would subprocess.run( # noqa: ASYNC221, S603 From bf36a331c4440b74b0b53e6851590cd98b4901a7 Mon Sep 17 00:00:00 2001 From: Josef Prochazka Date: Mon, 1 Dec 2025 10:17:18 +0100 Subject: [PATCH 3/3] Remove injected error --- tests/e2e/project_template/test_static_crawlers_templates.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/e2e/project_template/test_static_crawlers_templates.py b/tests/e2e/project_template/test_static_crawlers_templates.py index 46bedb9e45..cb951587e0 100644 --- a/tests/e2e/project_template/test_static_crawlers_templates.py +++ b/tests/e2e/project_template/test_static_crawlers_templates.py @@ -73,7 +73,6 @@ async def test_static_crawler_actor_at_apify( # Print apify version for debugging purposes in rare cases of CLI failures subprocess.run(['apify', '--version'], check=True) # noqa: ASYNC221, S607 - raise RuntimeError('Just to see if the cli version is printed') # Build actor using sequence of cli commands as the user would subprocess.run( # noqa: ASYNC221, S603