diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91ebd2e..94a3681 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,3 +50,24 @@ jobs: - name: Run tests run: | pytest tests/ + + langchain_test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10'] + timeout-minutes: 20 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install . + pip install integrations/langchain[dev] + - name: Run tests + run: | + pytest integrations/langchain/tests diff --git a/integrations/langchain/pyproject.toml b/integrations/langchain/pyproject.toml index 5d06e6f..40527ed 100644 --- a/integrations/langchain/pyproject.toml +++ b/integrations/langchain/pyproject.toml @@ -20,7 +20,6 @@ dev = [ "typing_extensions", "databricks-sdk>=0.34.0", "ruff==0.6.4", - "langgraph", ] [build-system] diff --git a/integrations/langchain/tests/test_genie.py b/integrations/langchain/tests/test_genie.py index 9c4fabb..805be03 100644 --- a/integrations/langchain/tests/test_genie.py +++ b/integrations/langchain/tests/test_genie.py @@ -1,7 +1,7 @@ from unittest.mock import patch from langchain_core.messages import AIMessage -from my_module import _concat_messages_array, _query_genie_as_agent, create_genie_agent +from databricks_langchain.genie import _concat_messages_array, _query_genie_as_agent, create_genie_agent def test_concat_messages_array(): @@ -35,7 +35,7 @@ def __init__(self, role, content): assert result == expected -@patch("databricks_ai_bridge.genie.Genie") +@patch("databricks_langchain.genie.Genie") def test_query_genie_as_agent(MockGenie): # Mock the Genie class and its response mock_genie = MockGenie.return_value