[object Object]

← back to Exo

check processes in github workflow

67a1aaa823f087e8ee1858f25606f6727cf87087 · 2024-07-26 23:37:11 -0700 · Alex Cheema

Files touched

Diff

commit 67a1aaa823f087e8ee1858f25606f6727cf87087
Author: Alex Cheema <alexcheema123@gmail.com>
Date:   Fri Jul 26 23:37:11 2024 -0700

    check processes in github workflow
---
 .github/workflows/test.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 7971965e..18ea78d5 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -127,6 +127,23 @@ jobs:
         # Wait for discovery
         sleep 10
 
+        # Function to check if processes are still running
+        check_processes() {
+          if ! kill -0 $PID1 2>/dev/null; then
+            echo "First instance (PID $PID1) died unexpectedly. Log output:"
+            cat output1.log
+            exit 1
+          fi
+          if ! kill -0 $PID2 2>/dev/null; then
+            echo "Second instance (PID $PID2) died unexpectedly. Log output:"
+            cat output2.log
+            exit 1
+          fi
+        }
+
+        # Check processes before proceeding
+        check_processes
+
         # first one to load the model
         curl -s http://localhost:8000/v1/chat/completions \
             -H "Content-Type: application/json" \
@@ -136,6 +153,9 @@ jobs:
               "temperature": 0.7
             }'
 
+        # Check processes after model load
+        check_processes
+
         response_1=$(curl -s http://localhost:8000/v1/chat/completions \
           -H "Content-Type: application/json" \
           -d '{
@@ -145,6 +165,9 @@ jobs:
           }')
         echo "Response 1: $response_1"
 
+        # Check processes after first response
+        check_processes
+
         response_2=$(curl -s http://localhost:8000/v1/chat/completions \
           -H "Content-Type: application/json" \
           -d '{
@@ -154,6 +177,9 @@ jobs:
           }')
         echo "Response 2: $response_2"
 
+        # Check processes after second response
+        check_processes
+
         # Stop both instances
         kill $PID1 $PID2
 

← 628d8679 force mlx inference engine in github workflow, where it defa  ·  back to Exo  ·  disable chatgpt api integration test, github changed somethi faa13194 →