Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: Fix CI environment variable check and apply formatting

LearningCircuitd5aba330f9f4
diff --git a/tests/api_tests_with_login/pytest_tests/test_start_research.py b/tests/api_tests_with_login/pytest_tests/test_start_research.py
index 5421d65997..4e99702b62 100644
--- a/tests/api_tests_with_login/pytest_tests/test_start_research.py
+++ b/tests/api_tests_with_login/pytest_tests/test_start_research.py
@@ -8,7 +8,8 @@ import time
# Skip entire module in CI
pytestmark = pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="API integration tests require running server - skipped in CI",
)
diff --git a/tests/api_tests_with_login/test_research_api_pytest.py b/tests/api_tests_with_login/test_research_api_pytest.py
index f7d34e38e1..a896c78920 100644
--- a/tests/api_tests_with_login/test_research_api_pytest.py
+++ b/tests/api_tests_with_login/test_research_api_pytest.py
@@ -79,7 +79,10 @@ class AuthHelper:
def auth_session():
"""Session-wide fixture for authenticated requests"""
# Skip in CI - requires running server
- if os_module.environ.get("CI") or os_module.environ.get("GITHUB_ACTIONS"):
+ if (
+ os_module.environ.get("CI") == "true"
+ or os_module.environ.get("GITHUB_ACTIONS") == "true"
+ ):
pytest.skip("Skipping API tests in CI - requires running server")
cookies, csrf_token = AuthHelper.get_auth_cookies()
@@ -95,7 +98,8 @@ def auth_session():
@pytest.mark.skipif(
- os_module.environ.get("CI") or os_module.environ.get("GITHUB_ACTIONS"),
+ os_module.environ.get("CI") == "true"
+ or os_module.environ.get("GITHUB_ACTIONS") == "true",
reason="API integration tests require running server - skipped in CI",
)
class TestResearchAPI:
diff --git a/tests/auth_tests/test_auth_integration.py b/tests/auth_tests/test_auth_integration.py
index b23a6cc327..d5eee6020a 100644
--- a/tests/auth_tests/test_auth_integration.py
+++ b/tests/auth_tests/test_auth_integration.py
@@ -262,7 +262,8 @@ class TestAuthIntegration:
assert response.status_code != 302 # Not a redirect
@pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="Password change with encrypted DB re-keying is complex to test in CI",
)
def test_password_change_flow(self, client):
diff --git a/tests/auth_tests/test_auth_routes.py b/tests/auth_tests/test_auth_routes.py
index 9273953d6d..d4a2609517 100644
--- a/tests/auth_tests/test_auth_routes.py
+++ b/tests/auth_tests/test_auth_routes.py
@@ -253,7 +253,8 @@ class TestAuthRoutes:
assert "username" not in sess
@pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="Password change with encrypted DB re-keying is complex to test in CI",
)
def test_change_password(self, client):
diff --git a/tests/auth_tests/test_encrypted_db.py b/tests/auth_tests/test_encrypted_db.py
index c2eddc28e0..b472f87ddf 100644
--- a/tests/auth_tests/test_encrypted_db.py
+++ b/tests/auth_tests/test_encrypted_db.py
@@ -156,7 +156,8 @@ class TestDatabaseManager:
assert is_valid is False
@pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="Password change with encrypted DB re-keying is complex to test in CI",
)
def test_change_password(self, db_manager, auth_user):
@@ -179,7 +180,8 @@ class TestDatabaseManager:
assert engine is None
@pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="Password change with encrypted DB re-keying is complex to test in CI",
)
def test_change_password_wrong_old(self, db_manager, auth_user):
diff --git a/tests/langchain_integration/test_combined_llm_retriever.py b/tests/langchain_integration/test_combined_llm_retriever.py
index 6ebee05761..2acb5d87db 100644
--- a/tests/langchain_integration/test_combined_llm_retriever.py
+++ b/tests/langchain_integration/test_combined_llm_retriever.py
@@ -171,7 +171,8 @@ class CompanyCustomLLM(LLM):
@pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="Langchain integration tests skipped in CI - testing advanced features",
)
class TestCombinedLLMRetriever:
diff --git a/tests/langchain_integration/test_custom_langchain_llm.py b/tests/langchain_integration/test_custom_langchain_llm.py
index 6e04fadd60..48cea3312c 100644
--- a/tests/langchain_integration/test_custom_langchain_llm.py
+++ b/tests/langchain_integration/test_custom_langchain_llm.py
@@ -53,7 +53,8 @@ class CustomTestLLM(LLM):
@pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="Langchain integration tests skipped in CI - testing advanced features",
)
class TestCustomLangChainLLM:
diff --git a/tests/langchain_integration/test_custom_langchain_retriever.py b/tests/langchain_integration/test_custom_langchain_retriever.py
index 294d35bdf1..1cd884870e 100644
--- a/tests/langchain_integration/test_custom_langchain_retriever.py
+++ b/tests/langchain_integration/test_custom_langchain_retriever.py
@@ -95,7 +95,8 @@ class CustomTestRetriever(BaseRetriever):
@pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="Langchain integration tests skipped in CI - testing advanced features",
)
class TestCustomLangChainRetriever:
diff --git a/tests/test_openai_api_key_usage.py b/tests/test_openai_api_key_usage.py
index 69eaa4ef14..89a46c088f 100644
--- a/tests/test_openai_api_key_usage.py
+++ b/tests/test_openai_api_key_usage.py
@@ -73,7 +73,8 @@ class TestOpenAIAPIKeyUsage:
assert call_args[1]["temperature"] == 0.7
@pytest.mark.skipif(
- os.environ.get("CI") or os.environ.get("GITHUB_ACTIONS"),
+ os.environ.get("CI") == "true"
+ or os.environ.get("GITHUB_ACTIONS") == "true",
reason="Skipped in CI - requires environment variable configuration",
)
def test_openai_api_key_from_environment(self, openai_settings_snapshot):