Repository navigation
80 lines (69 loc) · 2.45 KB
/
Copy pathpython-claude-sample.yml
File metadata and controls
80 lines (69 loc) · 2.45 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
74
75
76
77
78
79
80
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
name: Python Claude Sample - Build Validation
on:
workflow_call: # Called by orchestrator
workflow_dispatch: # Manual trigger
permissions:
contents: read
jobs:
build-and-validate:
name: Build and Validate Claude Sample
runs-on: ubuntu-latest
defaults:
run:
working-directory: python/claude/sample-agent
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --pre -e .
- name: Check Python syntax
run: |
python -m py_compile agent.py
python -m py_compile host_agent_server.py
python -m py_compile start_with_generic_host.py
python -m py_compile agent_interface.py
python -m py_compile local_authentication_options.py
python -m py_compile observability_config.py
python -m py_compile turn_context_utils.py
python -m py_compile mcp_tool_registration_service.py
- name: Validate pyproject.toml
run: |
if [ ! -f "pyproject.toml" ]; then
echo "pyproject.toml not found"
exit 1
fi
python -c "import tomllib; tomllib.load(open('pyproject.toml', 'rb'))" 2>/dev/null || python -c "import tomli; tomli.load(open('pyproject.toml', 'rb'))"
- name: Check for required files
run: |
required_files=("README.md" "AGENT-CODE-WALKTHROUGH.md" ".env.template" "ToolingManifest.json")
for file in "${required_files[@]}"; do
if [ ! -f "$file" ]; then
echo "Required file $file not found"
exit 1
fi
done
- name: Validate imports
continue-on-error: true
run: |
python -c "
import sys
sys.path.insert(0, '.')
try:
import agent_interface
import local_authentication_options
import observability_config
import turn_context_utils
import mcp_tool_registration_service
print('✅ All imports validated successfully')
except ImportError as e:
print(f'❌ Import validation failed: {e}')
sys.exit(1)
"