Browse Source

added yml changes

rahat2134 9 months ago
parent
commit
16447ba105
1 changed files with 33 additions and 3 deletions
  1. 33 3
      .circleci/config.yml

+ 33 - 3
.circleci/config.yml

@@ -44,6 +44,13 @@ commands:
             # Check processes before proceeding
             # Check processes before proceeding
             check_processes
             check_processes
 
 
+            # Special handling for dummy engine
+            if [ "<<parameters.inference_engine>>" = "dummy" ]; then
+              expected_content="This is a dummy response"
+            else
+              expected_content="Michael Jackson"
+            fi
+
             echo "Sending request to first instance..."
             echo "Sending request to first instance..."
             response_1=$(curl -s http://localhost:8000/v1/chat/completions \
             response_1=$(curl -s http://localhost:8000/v1/chat/completions \
               -H "Content-Type: application/json" \
               -H "Content-Type: application/json" \
@@ -74,8 +81,8 @@ commands:
             kill $PID1 $PID2
             kill $PID1 $PID2
 
 
             echo ""
             echo ""
-            if ! echo "$response_1" | grep -q "Michael Jackson" || ! echo "$response_2" | grep -q "Michael Jackson"; then
-              echo "Test failed: Response does not contain 'Michael Jackson'"
+            if ! echo "$response_1" | grep -q "$expected_content" || ! echo "$response_2" | grep -q "$expected_content"; then
+              echo "Test failed: Response does not contain '$expected_content'"
               echo "Response 1: $response_1"
               echo "Response 1: $response_1"
               echo ""
               echo ""
               echo "Response 2: $response_2"
               echo "Response 2: $response_2"
@@ -85,7 +92,7 @@ commands:
               cat output2.log
               cat output2.log
               exit 1
               exit 1
             else
             else
-              echo "Test passed: Response from both nodes contains 'Michael Jackson'"
+              echo "Test passed: Response from both nodes contains '$expected_content'"
             fi
             fi
 
 
 jobs:
 jobs:
@@ -178,6 +185,28 @@ jobs:
           inference_engine: mlx
           inference_engine: mlx
           model_id: llama-3.2-1b
           model_id: llama-3.2-1b
 
 
+  chatgpt_api_integration_test_dummy:
+    macos:
+      xcode: "16.0.0"
+    resource_class: m2pro.large
+    steps:
+      - checkout
+      - run:
+          name: Set up Python
+          command: |
+            brew install python@3.12
+            python3.12 -m venv env
+            source env/bin/activate
+      - run:
+          name: Install dependencies
+          command: |
+            source env/bin/activate
+            pip install --upgrade pip
+            pip install .
+      - run_chatgpt_api_test:
+          inference_engine: dummy
+          model_id: dummy-model
+
   test_macos_m1:
   test_macos_m1:
     macos:
     macos:
       xcode: "16.0.0"
       xcode: "16.0.0"
@@ -215,5 +244,6 @@ workflows:
       - unit_test
       - unit_test
       - discovery_integration_test
       - discovery_integration_test
       - chatgpt_api_integration_test_mlx
       - chatgpt_api_integration_test_mlx
+      - chatgpt_api_integration_test_dummy
       - test_macos_m1
       - test_macos_m1
       # - chatgpt_api_integration_test_tinygrad
       # - chatgpt_api_integration_test_tinygrad