diff --git a/.github/workflows/python_a2ui_agent_build_and_test.yml b/.github/workflows/python_a2ui_agent_build_and_test.yml new file mode 100644 index 000000000..2bd45d14b --- /dev/null +++ b/.github/workflows/python_a2ui_agent_build_and_test.yml @@ -0,0 +1,51 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Build and Test A2UI-agent Python SDK + +on: + push: + branches: + - '*' + paths: + - 'a2a_agents/python/a2ui_agent/**' + pull_request: + paths: + - 'a2a_agents/python/a2ui_agent/**' + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install `uv` globally + run: | + python -m pip install --upgrade pip + pip install uv + + - name: Build the python SDK + working-directory: a2a_agents/python/a2ui_agent + run: uv build . + + - name: Run unit tests + working-directory: a2a_agents/python/a2ui_agent + run: uv run --with pytest pytest tests/ diff --git a/a2a_agents/python/a2ui_agent/README.md b/a2a_agents/python/a2ui_agent/README.md index 7553a0f14..d15bca8bb 100644 --- a/a2a_agents/python/a2ui_agent/README.md +++ b/a2a_agents/python/a2ui_agent/README.md @@ -24,6 +24,14 @@ The `src/a2ui/extension` directory contains the core logic for the A2UI agent ex uv run --with pytest pytest tests/ ``` +## Building the SDK + +To build the SDK, run the following command from the `a2a_agents/python/a2ui_agent` directory: + +```bash +uv build . +``` + ## Disclaimer Important: The sample code provided is for demonstration purposes and illustrates the mechanics of A2UI and the Agent-to-Agent (A2A) protocol. When building production applications, it is critical to treat any agent operating outside of your direct control as a potentially untrusted entity.