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' 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 \ 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