-
Notifications
You must be signed in to change notification settings - Fork 81
73 lines (63 loc) · 2.08 KB
/
Copy pathintegration.yml
File metadata and controls
73 lines (63 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Integration Tests
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
- '**/docs/**'
- '**/.github/workflows/publish.yml'
pull_request:
paths-ignore:
- '**/README.md'
- '**/docs/**'
- '**/.github/workflows/publish.yml'
jobs:
integration-tests:
name: Run integration tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
services:
spin:
image: ghcr.io/nolabs-ai/deepfabric/tools-sdk:latest
ports:
- 3000:3000
strategy:
fail-fast: false
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
- name: Wait for Spin service
run: |
echo "Waiting for Spin service to be ready..."
for i in {1..30}; do
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/vfs/execute -X POST \
-H "Content-Type: application/json" \
-d '{"session_id":"healthcheck","tool":"list_files","args":{"directory":"/"}}' 2>/dev/null || echo "000")
if [ "$response" = "200" ]; then
echo "Spin service is ready"
exit 0
fi
echo "Attempt $i: waiting... (HTTP $response)"
sleep 2
done
echo "Spin service failed to become ready"
exit 1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v7
with:
enable-cache: true
- name: Install dependencies
run: uv sync --all-extras
- name: Run integration tests
run: make test-integration
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
SPIN_ENDPOINT: http://localhost:3000