3838 timeout 10 ./shimmy serve --bind 127.0.0.1:11435 || true
3939 echo "✅ Server binary can start"
4040
41+ - name : Download test image
42+ run : |
43+ curl -L -o test-image.jpg "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/320px-Camponotus_flavomarginatus_ant.jpg"
44+
45+ - name : Test vision features
46+ env :
47+ SHIMMY_LICENSE_KEY : " 1CF681-F65AC1-34018A-CA470A-1B107D-V3"
48+ run : |
49+ # Start server in background
50+ ./shimmy serve --bind 127.0.0.1:11435 &
51+ SERVER_PID=$!
52+
53+ # Wait for server
54+ for i in {1..30}; do
55+ if curl -s http://127.0.0.1:11435/health > /dev/null 2>&1; then
56+ echo "✅ Server ready"
57+ break
58+ fi
59+ sleep 1
60+ done
61+
62+ # Test vision API with test image
63+ base64_image=$(base64 -w 0 test-image.jpg)
64+ response=$(curl -s -X POST http://127.0.0.1:11435/api/vision \
65+ -H "Content-Type: application/json" \
66+ -d "{\"prompt\":\"What is in this image?\",\"image\":\"data:image/jpeg;base64,$base64_image\",\"max_tokens\":50}")
67+
68+ echo "Vision API response: $response"
69+
70+ # Check if response contains expected fields (either success or license error)
71+ if echo "$response" | grep -q "error\|choices\|message"; then
72+ echo "✅ Vision API responding correctly"
73+ else
74+ echo "❌ Vision API returned unexpected response"
75+ kill $SERVER_PID
76+ exit 1
77+ fi
78+
79+ kill $SERVER_PID
80+
4181 test-linux-arm64 :
4282 runs-on : ubuntu-latest
4383 steps :
@@ -83,6 +123,47 @@ jobs:
83123 shimmy-windows-x86_64.exe --help
84124 echo ✅ Help command works
85125
126+ - name : Download test image
127+ shell : bash
128+ run : |
129+ curl -L -o test-image.jpg "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/320px-Camponotus_flavomarginatus_ant.jpg"
130+
131+ - name : Test vision features
132+ shell : bash
133+ env :
134+ SHIMMY_LICENSE_KEY : " 1CF681-F65AC1-34018A-CA470A-1B107D-V3"
135+ run : |
136+ # Start server in background
137+ ./shimmy-windows-x86_64.exe serve --bind 127.0.0.1:11435 &
138+ SERVER_PID=$!
139+
140+ # Wait for server
141+ for i in {1..30}; do
142+ if curl -s http://127.0.0.1:11435/health > /dev/null 2>&1; then
143+ echo "✅ Server ready"
144+ break
145+ fi
146+ sleep 1
147+ done
148+
149+ # Test vision API
150+ base64_image=$(base64 -w 0 test-image.jpg)
151+ response=$(curl -s -X POST http://127.0.0.1:11435/api/vision \
152+ -H "Content-Type: application/json" \
153+ -d "{\"prompt\":\"What is in this image?\",\"image\":\"data:image/jpeg;base64,$base64_image\",\"max_tokens\":50}")
154+
155+ echo "Vision API response: $response"
156+
157+ if echo "$response" | grep -q "error\|choices\|message"; then
158+ echo "✅ Vision API responding correctly"
159+ else
160+ echo "❌ Unexpected response"
161+ taskkill //PID $SERVER_PID //F
162+ exit 1
163+ fi
164+
165+ taskkill //PID $SERVER_PID //F
166+
86167 test-macos-intel :
87168 runs-on : macos-latest
88169 steps :
@@ -106,6 +187,41 @@ jobs:
106187 ./shimmy --help
107188 echo "✅ Help command works"
108189
190+ - name : Download test image
191+ run : |
192+ curl -L -o test-image.jpg "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/320px-Camponotus_flavomarginatus_ant.jpg"
193+
194+ - name : Test vision features
195+ env :
196+ SHIMMY_LICENSE_KEY : " 1CF681-F65AC1-34018A-CA470A-1B107D-V3"
197+ run : |
198+ ./shimmy serve --bind 127.0.0.1:11435 &
199+ SERVER_PID=$!
200+
201+ for i in {1..30}; do
202+ if curl -s http://127.0.0.1:11435/health > /dev/null 2>&1; then
203+ echo "✅ Server ready"
204+ break
205+ fi
206+ sleep 1
207+ done
208+
209+ base64_image=$(base64 test-image.jpg | tr -d '\n')
210+ response=$(curl -s -X POST http://127.0.0.1:11435/api/vision \
211+ -H "Content-Type: application/json" \
212+ -d "{\"prompt\":\"What is in this image?\",\"image\":\"data:image/jpeg;base64,$base64_image\",\"max_tokens\":50}")
213+
214+ echo "Vision API response: $response"
215+
216+ if echo "$response" | grep -q "error\|choices\|message"; then
217+ echo "✅ Vision API responding"
218+ else
219+ kill $SERVER_PID
220+ exit 1
221+ fi
222+
223+ kill $SERVER_PID
224+
109225 test-macos-arm64 :
110226 runs-on : macos-14
111227 steps :
@@ -129,6 +245,41 @@ jobs:
129245 ./shimmy --help
130246 echo "✅ Help command works"
131247
248+ - name : Download test image
249+ run : |
250+ curl -L -o test-image.jpg "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/320px-Camponotus_flavomarginatus_ant.jpg"
251+
252+ - name : Test vision features
253+ env :
254+ SHIMMY_LICENSE_KEY : " 1CF681-F65AC1-34018A-CA470A-1B107D-V3"
255+ run : |
256+ ./shimmy serve --bind 127.0.0.1:11435 &
257+ SERVER_PID=$!
258+
259+ for i in {1..30}; do
260+ if curl -s http://127.0.0.1:11435/health > /dev/null 2>&1; then
261+ echo "✅ Server ready"
262+ break
263+ fi
264+ sleep 1
265+ done
266+
267+ base64_image=$(base64 test-image.jpg | tr -d '\n')
268+ response=$(curl -s -X POST http://127.0.0.1:11435/api/vision \
269+ -H "Content-Type: application/json" \
270+ -d "{\"prompt\":\"What is in this image?\",\"image\":\"data:image/jpeg;base64,$base64_image\",\"max_tokens\":50}")
271+
272+ echo "Vision API response: $response"
273+
274+ if echo "$response" | grep -q "error\|choices\|message"; then
275+ echo "✅ Vision API responding"
276+ else
277+ kill $SERVER_PID
278+ exit 1
279+ fi
280+
281+ kill $SERVER_PID
282+
132283 summary :
133284 runs-on : ubuntu-latest
134285 needs : [test-linux-x86_64, test-linux-arm64, test-windows-x86_64, test-macos-intel, test-macos-arm64]
0 commit comments