Introduce per application validation for python Samples #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI - Build Python Agent Framework Sample Agent | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| paths: | |
| - 'python/agent-framework/sample-agent/**/*' | |
| - '.github/workflows/ci-python-agentframework-sampleagent.yml' | |
| pull_request: | |
| branches: [ main, master ] | |
| paths: | |
| - 'python/agent-framework/sample-agent/**/*' | |
| - '.github/workflows/ci-python-agentframework-sampleagent.yml' | |
| jobs: | |
| validate-sample: | |
| name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| working-directory: ./python/agent-framework/sample-agent | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.11', '3.12'] | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Display environment | |
| run: | | |
| python --version | |
| pip --version | |
| - name: Install dependencies from PyPI | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| - name: Verify dependencies installed | |
| run: | | |
| pip list | |
| python -c "import aiohttp; print('OK: aiohttp')" | |
| python -c "import fastapi; print('OK: fastapi')" | |
| python -c "import pydantic; print('OK: pydantic')" | |
| - name: Validate syntax | |
| run: | | |
| python -m py_compile agent.py | |
| python -m py_compile agent_interface.py | |
| python -m py_compile host_agent_server.py | |
| python -m py_compile local_authentication_options.py | |
| python -m py_compile token_cache.py | |
| python -m py_compile start_with_generic_host.py | |
| - name: Test imports | |
| continue-on-error: true | |
| run: | | |
| python -c "import agent" | |
| python -c "import agent_interface" | |
| python -c "import host_agent_server" | |
| - name: Summary | |
| if: always() | |
| shell: bash | |
| run: | | |
| echo "### Agent Framework Sample - Python ${{ matrix.python-version }} on ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY |