Fix breaking changes from databricks-ai-bridge 0.4.2 #478
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
pip install -r requirements/lint-requirements.txt | |
- name: Lint Python code with ruff | |
run: | | |
ruff check . | |
ruff format --check . | |
core_test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["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 .[dev] | |
- name: Run tests | |
run: | | |
pytest tests/ | |
langchain_test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
databricks-langchain-version: ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "dev"] # Include whatever past versions you need | |
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 core package | |
run: | | |
pip install .[dev] | |
- name: Install databricks-langchain version ${{ matrix.databricks-langchain-version }} | |
run: | | |
if [ "${{ matrix.databricks-langchain-version }}" = "dev" ]; then | |
pip install integrations/langchain[dev] | |
else | |
pip install "databricks-langchain==${{ matrix.databricks-langchain-version }}" | |
fi | |
- name: Run langchain integration tests | |
run: | | |
pytest integrations/langchain/tests/unit_tests | |
openai_test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["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/openai[dev] | |
- name: Run tests | |
run: | | |
pytest integrations/openai/tests/unit_tests | |
llamaindex_test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["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/llamaindex[dev] | |
- name: Run tests | |
run: | | |
pytest integrations/llamaindex/tests/unit_tests |