Skip to content

Commit f68e563

Browse files
Introduce per application validation for python Samples (#120)
* Introduce per application validation for python Samples * Introduce per application validation for python Samples * Introduce per application validation for python Samples * Introduce per application validation for python Samples * Introduce per application validation for python Samples * Introduce per application validation for python Samples * Introduce per application validation for python Samples * Introduce per application validation for python Samples
1 parent 7075237 commit f68e563

3 files changed

Lines changed: 237 additions & 0 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI - Build Python Agent Framework Sample Agent
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
branches: [ main, master ]
8+
paths:
9+
- 'python/agent-framework/sample-agent/**/*'
10+
- '.github/workflows/ci-python-agentframework-sampleagent.yml'
11+
pull_request:
12+
branches: [ main, master ]
13+
paths:
14+
- 'python/agent-framework/sample-agent/**/*'
15+
- '.github/workflows/ci-python-agentframework-sampleagent.yml'
16+
17+
jobs:
18+
validate-sample:
19+
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
21+
defaults:
22+
run:
23+
working-directory: ./python/agent-framework/sample-agent
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
python-version: ['3.11', '3.12']
29+
os: [ubuntu-latest, windows-latest]
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
40+
- name: Display environment
41+
run: |
42+
python --version
43+
pip --version
44+
45+
- name: Install dependencies from PyPI
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install --pre -e .
49+
50+
- name: Display installed package versions
51+
run: |
52+
pip show microsoft-agents-a365-sdk microsoft-agents-core microsoft-agents-orchestration microsoft-agents-teams-channel microsoft-agents-python-channels 2>/dev/null || echo "Package version information unavailable"
53+
shell: bash
54+
55+
- name: Verify dependencies installed
56+
run: |
57+
pip list
58+
python -c "import aiohttp; print('OK: aiohttp')"
59+
python -c "import fastapi; print('OK: fastapi')"
60+
python -c "import pydantic; print('OK: pydantic')"
61+
62+
- name: Compile and validate Python syntax
63+
run: |
64+
python -m compileall -f -q . || (echo "Syntax validation failed" && exit 1)
65+
echo "All Python files compiled successfully"
66+
67+
- name: Test imports
68+
continue-on-error: true
69+
run: |
70+
python -c "import agent"
71+
python -c "import agent_interface"
72+
python -c "import host_agent_server"
73+
74+
- name: Summary
75+
if: always()
76+
shell: bash
77+
run: |
78+
echo "### Agent Framework Sample - Python ${{ matrix.python-version }} on ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI - Build Python Google ADK Sample Agent
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
branches: [ main, master ]
8+
paths:
9+
- 'python/google-adk/sample-agent/**/*'
10+
- '.github/workflows/ci-python-googleadk-sampleagent.yml'
11+
pull_request:
12+
branches: [ main, master ]
13+
paths:
14+
- 'python/google-adk/sample-agent/**/*'
15+
- '.github/workflows/ci-python-googleadk-sampleagent.yml'
16+
17+
jobs:
18+
validate-sample:
19+
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
21+
defaults:
22+
run:
23+
working-directory: ./python/google-adk/sample-agent
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
python-version: ['3.11', '3.12']
29+
os: [ubuntu-latest, windows-latest]
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
40+
- name: Display environment
41+
run: |
42+
python --version
43+
pip --version
44+
45+
- name: Install dependencies from PyPI
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install --pre -e .
49+
50+
- name: Display installed package versions
51+
run: |
52+
pip show microsoft-agents-a365-sdk microsoft-agents-core microsoft-agents-orchestration microsoft-agents-teams-channel microsoft-agents-python-channels 2>/dev/null || echo "Package version information unavailable"
53+
shell: bash
54+
55+
- name: Verify dependencies installed
56+
run: |
57+
pip list
58+
python -c "import aiohttp; print('OK: aiohttp')"
59+
python -c "import fastapi; print('OK: fastapi')"
60+
python -c "import pydantic; print('OK: pydantic')"
61+
62+
- name: Compile and validate Python syntax
63+
run: |
64+
python -m compileall -f -q . || (echo "Syntax validation failed" && exit 1)
65+
echo "All Python files compiled successfully"
66+
67+
- name: Test imports
68+
continue-on-error: true
69+
run: |
70+
python -c "import agent"
71+
python -c "import mcp_tool_registration_service"
72+
73+
- name: Summary
74+
if: always()
75+
shell: bash
76+
run: |
77+
echo "### Google ADK Sample - Python ${{ matrix.python-version }} on ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: CI - Build Python OpenAI Sample Agent
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
branches: [ main, master ]
8+
paths:
9+
- 'python/openai/sample-agent/**/*'
10+
- '.github/workflows/ci-python-openai-sampleagent.yml'
11+
pull_request:
12+
branches: [ main, master ]
13+
paths:
14+
- 'python/openai/sample-agent/**/*'
15+
- '.github/workflows/ci-python-openai-sampleagent.yml'
16+
17+
jobs:
18+
validate-sample:
19+
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
21+
defaults:
22+
run:
23+
working-directory: ./python/openai/sample-agent
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
python-version: ['3.11', '3.12']
29+
os: [ubuntu-latest, windows-latest]
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
40+
- name: Display environment
41+
run: |
42+
python --version
43+
pip --version
44+
45+
- name: Install dependencies from PyPI
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install --pre -e .
49+
50+
- name: Display installed package versions
51+
run: |
52+
echo "=== Microsoft Agent 365 SDK Versions ==="
53+
pip show microsoft-agents-a365-tooling || echo "Not installed"
54+
pip show microsoft-agents-a365-tooling-extensions-openai || echo "Not installed"
55+
pip show microsoft-agents-a365-observability-core || echo "Not installed"
56+
echo ""
57+
58+
- name: Verify dependencies installed
59+
run: |
60+
pip list
61+
python -c "import openai; print('OK: openai')"
62+
python -c "import aiohttp; print('OK: aiohttp')"
63+
python -c "import fastapi; print('OK: fastapi')"
64+
python -c "import pydantic; print('OK: pydantic')"
65+
66+
- name: Compile and validate Python syntax
67+
run: |
68+
python -m compileall -f -q . || (echo "Syntax validation failed" && exit 1)
69+
echo "All Python files compiled successfully"
70+
71+
- name: Test imports
72+
continue-on-error: true
73+
run: |
74+
python -c "import agent"
75+
python -c "import agent_interface"
76+
python -c "import host_agent_server"
77+
78+
- name: Summary
79+
if: always()
80+
shell: bash
81+
run: |
82+
echo "### OpenAI Sample - Python ${{ matrix.python-version }} on ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)