Skip to content

Commit

Permalink
wip5
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Dec 12, 2024
1 parent 8b220df commit a034385
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
# Big timeout to create environment in windows.
RUN_TESTS_TIMEOUT: 3000
ACTION_SERVER_TEST_ACCESS_CREDENTIALS: ${{ secrets.ACTION_SERVER_TEST_ACCESS_CREDENTIALS }}
PYTEST_CAN_RUN_DATA_SERVER: 1

run: poetry run python -u ../../sema4ai-python-ls-core/tests/run_tests.py -rfE -n 1 -otests_output_data_server -vv -m data_server .

Expand Down
9 changes: 9 additions & 0 deletions sema4ai/tests/sema4ai_code_tests/data_server_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@ def _is_current_db_data_valid(

@pytest.fixture(scope="session")
def data_server_cli(request, tmpdir_factory) -> Iterator["DataServerCliWrapper"]:
import os

if os.getenv("GITHUB_ACTIONS"):
# Detect if running in github actions
if not os.getenv("PYTEST_CAN_RUN_DATA_SERVER"):
raise RuntimeError(
"Test must be marked with @pytest.mark.data_server to run in github actions to use `data_server_cli` fixture"
)

from sema4ai_code_tests.data_server_cli_wrapper import DataServerCliWrapper
from sema4ai_ls_core.system_mutex import timed_acquire_mutex

Expand Down

0 comments on commit a034385

Please sign in to comment.