Skip to content

Commit f39dcfa

Browse files
Introduce per application validation for python Samples
1 parent 8f965c5 commit f39dcfa

3 files changed

Lines changed: 9 additions & 17 deletions

File tree

.github/workflows/ci-python-agentframework-sampleagent.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,10 @@ jobs:
5959
python -c "import fastapi; print('OK: fastapi')"
6060
python -c "import pydantic; print('OK: pydantic')"
6161
62-
- name: Validate syntax
62+
- name: Compile and validate Python syntax
6363
run: |
64-
python -m py_compile agent.py
65-
python -m py_compile agent_interface.py
66-
python -m py_compile host_agent_server.py
67-
python -m py_compile local_authentication_options.py
68-
python -m py_compile token_cache.py
69-
python -m py_compile start_with_generic_host.py
64+
python -m compileall -f -q . || (echo "Syntax validation failed" && exit 1)
65+
echo "All Python files compiled successfully"
7066
7167
- name: Test imports
7268
continue-on-error: true

.github/workflows/ci-python-googleadk-sampleagent.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ jobs:
5959
python -c "import fastapi; print('OK: fastapi')"
6060
python -c "import pydantic; print('OK: pydantic')"
6161
62-
- name: Validate syntax
62+
- name: Compile and validate Python syntax
6363
run: |
64-
python -m py_compile agent.py
65-
python -m py_compile mcp_tool_registration_service.py
64+
python -m compileall -f -q . || (echo "Syntax validation failed" && exit 1)
65+
echo "All Python files compiled successfully"
6666
6767
- name: Test imports
6868
continue-on-error: true

.github/workflows/ci-python-openai-sampleagent.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,10 @@ jobs:
6363
python -c "import fastapi; print('OK: fastapi')"
6464
python -c "import pydantic; print('OK: pydantic')"
6565
66-
- name: Validate syntax
66+
- name: Compile and validate Python syntax
6767
run: |
68-
python -m py_compile agent.py
69-
python -m py_compile agent_interface.py
70-
python -m py_compile host_agent_server.py
71-
python -m py_compile local_authentication_options.py
72-
python -m py_compile token_cache.py
73-
python -m py_compile start_with_generic_host.py
68+
python -m compileall -f -q . || (echo "Syntax validation failed" && exit 1)
69+
echo "All Python files compiled successfully"
7470
7571
- name: Test imports
7672
continue-on-error: true

0 commit comments

Comments
 (0)