From 6586c20ff0ae4304f7f2cec2259af5a347d0f864 Mon Sep 17 00:00:00 2001 From: CATHLEEN ANN TICO/kerrrang9214 <242015866+kerrrang9214-tech@users.noreply.github.com> Date: Sat, 9 May 2026 03:35:00 -0700 Subject: [PATCH 1/6] Add GitHub Actions workflow for Python package This workflow installs Python dependencies, runs tests, and lints code with multiple Python versions. --- .github/workflows/python-package.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000000..e56abb6303 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest From a9bde2b599b3df1b8640f64678f178aab1fecbe3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Jun 2026 17:47:35 +0000 Subject: [PATCH 2/6] Initial plan From 01c4172f79de333deb7f335736edf44852b85861 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Jun 2026 17:49:52 +0000 Subject: [PATCH 3/6] fix(ci): add fallback token for v2 sync workflow --- .github/workflows/v2-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/v2-sync.yml b/.github/workflows/v2-sync.yml index c627f40d46..7b2acb0a75 100644 --- a/.github/workflows/v2-sync.yml +++ b/.github/workflows/v2-sync.yml @@ -19,7 +19,7 @@ jobs: with: ref: v2 fetch-depth: 0 - token: ${{ secrets.RELEASE_PAT }} + token: ${{ secrets.RELEASE_PAT || github.token }} - name: Check for new commits on main id: check @@ -50,7 +50,7 @@ jobs: - name: Create sync PR if: steps.check.outputs.behind != '0' && steps.existing.outputs.exists == 'false' env: - GH_TOKEN: ${{ secrets.RELEASE_PAT }} + GH_TOKEN: ${{ secrets.RELEASE_PAT || github.token }} run: | gh pr create \ --base v2 \ From 0c5988efb0a26c857779da61bf06fd6fe35ee17d Mon Sep 17 00:00:00 2001 From: CATHLEEN ANN TICO/kerrrang9214 <242015866+kerrrang9214-tech@users.noreply.github.com> Date: Fri, 19 Jun 2026 19:57:35 -0700 Subject: [PATCH 4/6] Add initial devcontainer configuration --- .devcontainer/devcontainer.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..39bbd2681d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": {} +} From 288940d3f0720560dd39ecf95e0fb352159f7938 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 02:10:46 +0000 Subject: [PATCH 5/6] ci(pr-triage): fall back to github.token when ADK_TRIAGE_AGENT secret is unset --- .github/workflows/pr-triage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml index 6557820f04..8842194683 100644 --- a/.github/workflows/pr-triage.yml +++ b/.github/workflows/pr-triage.yml @@ -34,7 +34,7 @@ jobs: - name: Run Triaging Script env: - GITHUB_TOKEN: ${{ secrets.ADK_TRIAGE_AGENT }} + GITHUB_TOKEN: ${{ secrets.ADK_TRIAGE_AGENT || github.token }} GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} GOOGLE_GENAI_USE_VERTEXAI: 0 OWNER: 'google' From 3482228ead53aec851fc5e06ae2aa8d329aa12e3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 02:16:33 +0000 Subject: [PATCH 6/6] fix(tests): pass exc_type=ImportError to pytest.importorskip for crewai test pytest 9.1 changed the default exc_type of importorskip from ImportError to ModuleNotFoundError. crewai_tool.py re-raises the ModuleNotFoundError as a plain ImportError, which pytest 9.1+ no longer catches by default, causing a collection error instead of a skip. Pass exc_type=ImportError explicitly so the module is properly skipped when crewai is not installed. Also fix the misleading skip reason. --- tests/unittests/integrations/crewai/test_crewai_tool.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unittests/integrations/crewai/test_crewai_tool.py b/tests/unittests/integrations/crewai/test_crewai_tool.py index f7f9bfe0bd..9e6c4c29fd 100644 --- a/tests/unittests/integrations/crewai/test_crewai_tool.py +++ b/tests/unittests/integrations/crewai/test_crewai_tool.py @@ -16,9 +16,13 @@ import pytest -# Skip entire module if Python < 3.10 (must be before crewai_tool import) +# Skip entire module if crewai is not installed (must be before crewai_tool import). +# exc_type=ImportError is required because crewai_tool.py re-raises the +# ModuleNotFoundError as ImportError, which pytest 9.1+ does not catch by default. pytest.importorskip( - "google.adk.integrations.crewai.crewai_tool", reason="Requires Python 3.10+" + "google.adk.integrations.crewai.crewai_tool", + reason="Requires crewai package (pip install 'google-adk[extensions]')", + exc_type=ImportError, ) from google.adk.agents.context import Context