Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/install-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ jobs:
extras: ''
- name: http-server
extras: '[http-server]'
- name: grpc
extras: '[grpc]'
- name: telemetry
extras: '[telemetry]'
- name: sql
extras: '[sql]'
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand Down
29 changes: 29 additions & 0 deletions scripts/test_install_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
smoke-test. Available profiles:
base -- `pip install a2a-sdk`
http-server -- `pip install a2a-sdk[http-server]`
grpc -- `pip install a2a-sdk[grpc]`
telemetry -- `pip install a2a-sdk[telemetry]`
sql -- `pip install a2a-sdk[sql]`

Exit codes:
0 - All imports for the profile succeeded
Expand Down Expand Up @@ -80,10 +83,36 @@
'a2a.server.routes.rest_routes',
]

# Modules that MUST be importable with only the base + `grpc` extras
# installed (no `http-server`, `sql`, `signing`, `telemetry`, etc.).
GRPC_MODULES = [
'a2a.server.request_handlers.grpc_handler',
'a2a.client.transports.grpc',
'a2a.compat.v0_3.grpc_handler',
'a2a.compat.v0_3.grpc_transport',
]

# Modules that MUST be importable with only the base + `telemetry`
# extras installed.
TELEMETRY_MODULES = [
'a2a.utils.telemetry',
]

# Modules that MUST be importable with only the base + `sql` extras
# installed (covers postgresql/mysql/sqlite drivers via SQLAlchemy).
SQL_MODULES = [
'a2a.server.models',
'a2a.server.tasks.database_task_store',
'a2a.server.tasks.database_push_notification_config_store',
]


PROFILES: dict[str, list[str]] = {
'base': CORE_MODULES,
'http-server': CORE_MODULES + HTTP_SERVER_MODULES,
'grpc': CORE_MODULES + GRPC_MODULES,
'telemetry': CORE_MODULES + TELEMETRY_MODULES,
'sql': CORE_MODULES + SQL_MODULES,
}


Expand Down
8 changes: 7 additions & 1 deletion scripts/test_install_smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
# Available profiles (must match those in scripts/test_install_smoke.py):
# base -- `pip install a2a-sdk`
# http-server -- `pip install a2a-sdk[http-server]`
# grpc -- `pip install a2a-sdk[grpc]`
# telemetry -- `pip install a2a-sdk[telemetry]`
# sql -- `pip install a2a-sdk[sql]`
#
# Usage:
# scripts/test_install_smoke.sh [profile] [python-version]
Expand All @@ -24,7 +27,7 @@ set -o pipefail
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$REPO_ROOT"

ALL_PROFILES=(base http-server)
ALL_PROFILES=(base http-server grpc telemetry sql)

PROFILE_ARG="${1:-}"
PYTHON_VERSION="${2:-}"
Expand All @@ -39,6 +42,9 @@ extras_for_profile() {
case "$1" in
base) echo "" ;;
http-server) echo "[http-server]" ;;
grpc) echo "[grpc]" ;;
telemetry) echo "[telemetry]" ;;
sql) echo "[sql]" ;;
*)
echo "Unknown profile '$1'. Available: ${ALL_PROFILES[*]}" >&2
return 1
Expand Down
Loading