Fix to run new automation api tests in ci

This commit is contained in:
Debanjum
2025-07-08 21:03:47 -07:00
parent c144aa9c90
commit f0513cbbb1
4 changed files with 16 additions and 6 deletions

View File

@@ -10,9 +10,9 @@ from tests.helpers import ConversationFactory, generate_chat_history, get_chat_a
# Initialize variables for tests
api_key = get_chat_api_key()
if api_key is None:
if api_key is None or not os.getenv("KHOJ_TEST_CHAT_PROVIDER"):
pytest.skip(
reason="Set OPENAI_API_KEY environment variable to run tests below. Get OpenAI API key from https://platform.openai.com/account/api-keys",
reason="Set OPENAI_API_KEY, GEMINI_API_KEY or ANTHROPIC_API_KEY environment variable to run tests below.",
allow_module_level=True,
)