From e5aba589d878f88b13d4ce9c03eb042157146951 Mon Sep 17 00:00:00 2001 From: Ivan Shymko Date: Wed, 22 Apr 2026 07:49:08 +0000 Subject: [PATCH] test: add more test cases to "install-smoke" --- .github/workflows/install-smoke.yml | 6 ++++++ scripts/test_install_smoke.py | 29 +++++++++++++++++++++++++++++ scripts/test_install_smoke.sh | 8 +++++++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install-smoke.yml b/.github/workflows/install-smoke.yml index 0b9781b2c..5c8a97d4a 100644 --- a/.github/workflows/install-smoke.yml +++ b/.github/workflows/install-smoke.yml @@ -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 diff --git a/scripts/test_install_smoke.py b/scripts/test_install_smoke.py index df33c8386..41ad029bb 100755 --- a/scripts/test_install_smoke.py +++ b/scripts/test_install_smoke.py @@ -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 @@ -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, } diff --git a/scripts/test_install_smoke.sh b/scripts/test_install_smoke.sh index 863f9c12c..9f0a45fbd 100755 --- a/scripts/test_install_smoke.sh +++ b/scripts/test_install_smoke.sh @@ -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] @@ -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:-}" @@ -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