Skip to content

Commit

Permalink
fix: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sangjanai committed Dec 27, 2024
1 parent 4c1a26f commit 1d900b3
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 224 deletions.
Empty file modified .github/scripts/e2e-test-server-linux-and-mac.sh
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions .github/scripts/e2e-test-server-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ set "curl_data3={\"llama_model_path\":\"%MODEL_LLM_PATH_STRING%\"}"
set "curl_data4={\"llama_model_path\":\"%MODEL_EMBEDDING_PATH_STRING%\", \"embedding\": true, \"model_type\": \"embedding\"}"
set "curl_data5={}"
set "curl_data6={\"input\": \"Hello\", \"model\": \"test-embedding\", \"encoding_format\": \"float\"}"
set "curl_data7={\"model\": \"test-embedding\"}"

rem Print the values of curl_data for debugging
echo curl_data1=%curl_data1%
Expand All @@ -77,6 +78,7 @@ echo curl_data3=%curl_data3%
echo curl_data4=%curl_data4%
echo curl_data5=%curl_data5%
echo curl_data6=%curl_data6%
echo curl_data7=%curl_data7%

rem Run the curl commands and capture the status code
curl.exe --connect-timeout 60 -o "%TEMP%\response1.log" -s -w "%%{http_code}" --location "http://127.0.0.1:%PORT%/loadmodel" --header "Content-Type: application/json" --data "%curl_data1%" > %TEMP%\response1.log 2>&1
Expand All @@ -95,6 +97,8 @@ curl.exe --connect-timeout 60 -o "%TEMP%\response6.log" -s -w "%%{http_code}" --
--header "Content-Type: application/json" ^
--data "%curl_data6%" > %TEMP%\response6.log 2>&1

curl.exe --connect-timeout 60 -s -w "%%{http_code}" --location "http://127.0.0.1:%PORT%/unloadmodel" --header "Content-Type: application/json" --data "%curl_data7%" 2>&1

set "error_occurred=0"

rem Read the status codes from the log files
Expand Down
Loading

0 comments on commit 1d900b3

Please sign in to comment.