File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,7 +176,11 @@ jobs:
176176 - name : Run the end-to-end tests
177177 run : |
178178 uv run --frozen python --version
179- uv run --frozen pytest -n 2 --dist loadfile -s -v --log-cli-level=INFO tests/e2e
179+ uv run --frozen pytest -n 4 --dist loadfile -s -v --log-cli-level=INFO tests/e2e -m "not serial_e2e"
180+
181+ - name : Run serial end-to-end tests
182+ run : |
183+ uv run --frozen pytest -s -v --log-cli-level=INFO tests/e2e -m serial_e2e
180184
181185 all-tests-passed :
182186 # This allows us to have a branch protection rule for tests and deploys with matrix
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ log_cli = true
5555markers = [
5656 " unit: deterministic tests that run without a Langfuse server" ,
5757 " e2e: tests that require a real Langfuse server or persisted backend behaviour" ,
58+ " serial_e2e: e2e tests that must not share server concurrency with the rest of the suite" ,
5859 " live_provider: tests that call live model providers and are kept out of default CI" ,
5960]
6061
Original file line number Diff line number Diff line change 1010from langfuse ._client .client import Langfuse
1111from langfuse ._client .resource_manager import LangfuseResourceManager
1212
13+ SERIAL_E2E_NODEIDS = {
14+ "tests/e2e/test_core_sdk.py::test_create_boolean_score" ,
15+ "tests/e2e/test_core_sdk.py::test_create_categorical_score" ,
16+ "tests/e2e/test_core_sdk.py::test_create_score_with_custom_timestamp" ,
17+ "tests/e2e/test_decorators.py::test_return_dict_for_output" ,
18+ "tests/e2e/test_decorators.py::test_media" ,
19+ "tests/e2e/test_decorators.py::test_merge_metadata_and_tags" ,
20+ "tests/e2e/test_experiments.py::test_boolean_score_types" ,
21+ "tests/e2e/test_media.py::test_replace_media_reference_string_in_object" ,
22+ }
23+
1324
1425class InMemorySpanExporter (SpanExporter ):
1526 """Simple in-memory exporter to collect spans for deterministic tests."""
@@ -45,6 +56,8 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
4556
4657 if test_group == "e2e" :
4758 item .add_marker (pytest .mark .e2e )
59+ if item .nodeid in SERIAL_E2E_NODEIDS :
60+ item .add_marker (pytest .mark .serial_e2e )
4861 continue
4962
5063 if test_group == "live_provider" :
You can’t perform that action at this time.
0 commit comments