1- name : Docker Scripts Validation
1+ name : Agents Validation
22
33on :
4- push :
5- branches : ["main"]
6- paths :
7- - " Dockerfile"
8- - " scripts/**"
9- - " pyproject.toml"
10- - " uv.lock"
114 pull_request :
12- branches : ["main"]
5+ branches :
6+ - main
137 paths :
8+ - " .github/workflows/docker-agents.yml"
149 - " Dockerfile"
15- - " scripts /**"
10+ - " agents /**"
1611 - " pyproject.toml"
1712 - " uv.lock"
1813
1914permissions :
2015 contents : read
2116
2217jobs :
23- validate-docker-scripts :
18+ validate-docker-agents :
2419 runs-on : ubuntu-latest
25-
20+
2621 strategy :
2722 matrix :
28- script :
23+ agent :
2924 - name : " PDF Ingestion"
3025 extras : " pdf"
31- script_file : " ingest_pdf.py"
26+ filename : " ingest_pdf.py"
3227 test_timeout : " 300" # 5 minutes
33-
3428 env :
35- # Test environment variables
3629 LOG_LEVEL : INFO
3730 AGENT__GEMINI_MODEL : " gemini-2.0-flash"
3831 AGENT__GEMINI_API_KEY : ${{ secrets.AGENT__GEMINI_API_KEY }}
@@ -47,46 +40,46 @@ jobs:
4740 - name : Set up Docker Buildx
4841 uses : docker/setup-buildx-action@v3
4942
50- - name : Build Docker image for ${{ matrix.script .name }}
43+ - name : Build Docker image for ${{ matrix.agent .name }}
5144 run : |
5245 docker build \
53- --build-arg EXTRAS=${{ matrix.script .extras }} \
54- --build-arg SCRIPT =${{ matrix.script.script_file }} \
55- --tag fai-script -${{ matrix.script .extras }} \
46+ --build-arg EXTRAS=${{ matrix.agent .extras }} \
47+ --build-arg AGENT =${{ matrix.agent.filename }} \
48+ --tag fai-agent -${{ matrix.agent .extras }} \
5649 --cache-from type=gha \
5750 --cache-to type=gha,mode=max \
5851 .
5952
60- - name : Validate script exists in image
53+ - name : Validate agent script exists in image
6154 run : |
62- docker run --rm fai-script -${{ matrix.script .extras }} \
63- test -f "/app/scripts /${{ matrix.script.script_file }}"
55+ docker run --rm fai-agent -${{ matrix.agent .extras }} \
56+ test -f "/app/agents /${{ matrix.agent.filename }}"
6457
65- - name : Test script startup (dry run)
58+ - name : Test agent startup (dry run)
6659 timeout-minutes : 5
6760 run : |
68- # Simple validation that the script exists and dependencies are available
61+ # Simple validation that the agent exists and dependencies are available
6962 docker run --rm \
7063 -e LOG_LEVEL="$LOG_LEVEL" \
7164 -e AGENT__GEMINI_MODEL="$AGENT__GEMINI_MODEL" \
7265 -e AGENT__GEMINI_API_KEY="$AGENT__GEMINI_API_KEY" \
7366 -e ECOSYSTEM__WEB3_PROVIDER_URL="$ECOSYSTEM__WEB3_PROVIDER_URL" \
7467 -e INGESTION__CHUNK_SIZE="$INGESTION__CHUNK_SIZE" \
7568 -e TEE__SIMULATE_ATTESTATION_TOKEN="$TEE__SIMULATE_ATTESTATION_TOKEN" \
76- fai-script -${{ matrix.script .extras }} \
69+ fai-agent -${{ matrix.agent .extras }} \
7770 python -c "
7871 import sys
7972 import os
8073
81- # Test that script file exists
82- script_path = '/app/scripts /${{ matrix.script.script_file }}'
83- if not os.path.exists(script_path ):
84- print(f'❌ Script not found: {script_path }')
74+ # Test that agent file exists
75+ agent_path = '/app/agents /${{ matrix.agent.filename }}'
76+ if not os.path.exists(agent_path ):
77+ print(f'❌ Agent not found: {agent_path }')
8578 sys.exit(1)
86- print(f'✅ Script exists: {script_path }')
79+ print(f'✅ Agent exists: {agent_path }')
8780
8881 # Test that required dependencies are available
89- if '${{ matrix.script .extras }}' == 'pdf':
82+ if '${{ matrix.agent .extras }}' == 'pdf':
9083 try:
9184 import PIL
9285 import fitz # pymupdf
@@ -96,25 +89,24 @@ jobs:
9689 print(f'❌ PDF dependency missing: {e}')
9790 sys.exit(1)
9891
99- print('✅ Script validation completed successfully')
92+ print('✅ Agent validation completed successfully')
10093 "
10194
10295 - name : Test container health
10396 run : |
10497 # Test that the container can start and the Python environment is healthy
105- docker run --rm fai-script -${{ matrix.script .extras }} \
98+ docker run --rm fai-agent -${{ matrix.agent .extras }} \
10699 python -c "
107100 import sys
108101 print(f'Python version: {sys.version}')
109102 print(f'Python path: {sys.path}')
110103
111- # Test core dependencies (some modules may require optional deps)
104+ # Test core dependencies
112105 try:
113106 import flare_ai_kit
114107 print('✅ flare-ai-kit imported successfully')
115108 except ImportError as e:
116- print(f'⚠️ flare-ai-kit import issue (may need more extras): {e}')
117- # Test basic Python packages instead
109+ print(f'⚠️ flare-ai-kit import issue: {e}')
118110 import httpx, pydantic, structlog
119111 print('✅ Core Python dependencies available')
120112
@@ -127,16 +119,15 @@ jobs:
127119 print('✅ Container health check passed')
128120 "
129121
130- - name : Test script dependencies for ${{ matrix.script .name }}
122+ - name : Test agent dependencies for ${{ matrix.agent .name }}
131123 run : |
132124 # Test that the specific extras are properly installed
133- docker run --rm fai-script -${{ matrix.script .extras }} \
125+ docker run --rm fai-agent -${{ matrix.agent .extras }} \
134126 python -c "
135127 import sys
136-
137- extras = '${{ matrix.script.extras }}'
128+ extras = '${{ matrix.agent.extras }}'
138129 print(f'Testing dependencies for extras: {extras}')
139-
130+
140131 if 'pdf' in extras:
141132 try:
142133 import PIL
@@ -146,7 +137,7 @@ jobs:
146137 except ImportError as e:
147138 print(f'❌ PDF dependency missing: {e}')
148139 sys.exit(1)
149-
140+
150141 if 'rag' in extras:
151142 try:
152143 import qdrant_client
@@ -155,23 +146,21 @@ jobs:
155146 except ImportError as e:
156147 print(f'❌ RAG dependency missing: {e}')
157148 sys.exit(1)
158-
149+
159150 if 'a2a' in extras:
160151 try:
161152 import fastapi
162153 print('✅ A2A dependencies (fastapi) available')
163154 except ImportError as e:
164155 print(f'❌ A2A dependency missing: {e}')
165156 sys.exit(1)
166-
157+
167158 print('✅ All expected dependencies are available')
168159 "
169160
170-
171-
172161 validate-build-args :
173162 runs-on : ubuntu-latest
174-
163+
175164 steps :
176165 - name : Checkout repository
177166 uses : actions/checkout@v6
@@ -182,21 +171,21 @@ jobs:
182171 - name : Test build without extras
183172 run : |
184173 docker build \
185- --build-arg SCRIPT =ingest_pdf.py \
186- --tag fai-script -base \
174+ --build-arg AGENT =ingest_pdf.py \
175+ --tag fai-agent -base \
187176 .
188177
189178 - name : Test build with multiple extras
190179 run : |
191180 docker build \
192181 --build-arg EXTRAS=pdf,rag \
193- --build-arg SCRIPT =ingest_pdf.py \
194- --tag fai-script -multi \
182+ --build-arg AGENT =ingest_pdf.py \
183+ --tag fai-agent -multi \
195184 .
196185
197186 - name : Validate multi-extras build
198187 run : |
199- docker run --rm fai-script -multi \
188+ docker run --rm fai-agent -multi \
200189 python -c "
201190 import PIL, fitz, pytesseract # PDF deps
202191 import qdrant_client, dulwich # RAG deps
@@ -205,27 +194,27 @@ jobs:
205194
206195 validate-documentation :
207196 runs-on : ubuntu-latest
208-
197+
209198 steps :
210199 - name : Checkout repository
211200 uses : actions/checkout@v6
212201
213202 - name : Check documentation exists
214203 run : |
215- test -f docs/docker_scripts_guide .md
216- echo "✅ Docker scripts guide exists"
204+ test -f docs/docker_agents_guide .md
205+ echo "✅ Docker agents guide exists"
217206
218207 - name : Validate README updates
219208 run : |
220209 grep -q "parametric Dockerfile" README.md
221210 grep -q "EXTRAS" README.md
222- grep -q "docker_scripts_guide.md" README.md
223- echo "✅ README contains Docker scripts documentation"
211+ echo "✅ README contains Docker agents documentation"
224212
225- - name : Check scripts directory structure
213+ - name : Check agents directory structure
226214 run : |
227- test -d scripts
228- test -f scripts/ingest_pdf.py
229- test -d scripts/data
230- test -f scripts/data/create_sample_invoice.py
231- echo "✅ Scripts directory structure is correct"
215+ test -d agents
216+ test -f agents/ingest_pdf.py
217+ test -d agents/data
218+ test -f agents/data/create_sample_invoice.py
219+
220+ echo "✅ Agents directory structure is correct"
0 commit comments