File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -201,11 +201,12 @@ jobs:
201201 OPTILLM_API_KEY=optillm python -m pytest tests/test_conversation_logging_approaches.py -v --tb=short
202202
203203 echo "Running conversation logging server tests..."
204- OPTILLM_API_KEY=optillm python -m pytest tests/test_conversation_logging_server.py -v --tb=short
204+ OPTILLM_API_KEY=optillm OPTILLM_CONVERSATION_LOG_DIR=/tmp/optillm_conversations python -m pytest tests/test_conversation_logging_server.py -v --tb=short
205205
206206 echo "All conversation logging tests completed successfully!"
207207 env :
208208 OPTILLM_API_KEY : optillm
209+ OPTILLM_CONVERSATION_LOG_DIR : /tmp/optillm_conversations
209210 HF_TOKEN : ${{ secrets.HF_TOKEN }}
210211
211212 - name : Stop optillm server
Original file line number Diff line number Diff line change @@ -112,15 +112,20 @@ def setUp(self):
112112 """Set up test client"""
113113 if not self .server_available :
114114 self .skipTest ("OptILLM server not available" )
115-
115+
116116 self .client = OpenAI (api_key = "optillm" , base_url = "http://localhost:8000/v1" )
117-
118- # Determine log directory - use temp dir if we started server, otherwise default
117+
118+ # Determine log directory - priority order:
119+ # 1. temp_log_dir (if we started the server ourselves)
120+ # 2. OPTILLM_CONVERSATION_LOG_DIR environment variable (for CI)
121+ # 3. Default ~/.optillm/conversations
119122 if self .temp_log_dir :
120123 self .log_dir = self .temp_log_dir
124+ elif os .getenv ("OPTILLM_CONVERSATION_LOG_DIR" ):
125+ self .log_dir = Path (os .getenv ("OPTILLM_CONVERSATION_LOG_DIR" ))
121126 else :
122127 self .log_dir = Path .home () / ".optillm" / "conversations"
123-
128+
124129 # Record initial state for comparison
125130 self .initial_log_files = set (self .log_dir .glob ("*.jsonl" )) if self .log_dir .exists () else set ()
126131
You can’t perform that action at this time.
0 commit comments