Skip to content

Fix oss client create function (#1012) #36

Fix oss client create function (#1012)

Fix oss client create function (#1012) #36

name: UCAI Core Tests
on:
push:
branches:
- main
paths:
- ai/**
- .github/workflows/ucai-*.yml
pull_request:
paths:
- ai/**
- .github/workflows/ucai-*.yml
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: ai
steps:
- name: Check out code
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 .
- name: Lint YAML files with yamllint
run: yamllint .
core_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10']
pydantic-version: [1, 2]
timeout-minutes: 40
defaults:
run:
working-directory: ai
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Pydantic dependencies
run: |
if [ ${{ matrix.pydantic-version }} == 1 ]; then
pip install 'pydantic<2'
else
pip install 'pydantic<3,>=2'
fi
- name: Install dependencies
run: |
pip install mlflow
- name: Install Unity Catalog Python Libraries
run: |
dev/install_client.sh
- name: Start Unity Catalog Server
run: |
dev/start_unitycatalog.sh
- name: Run Tests
run: |
pytest core/tests --ignore=core/tests/core/databricks/test_databricks_unit_tests.py
- name: Run Databricks Unit Tests
if: matrix.python-version == '3.10'
run: |
pip install databricks-connect==15.1.0
pytest core/tests/core/databricks/test_databricks_unit_tests.py
- name: Stop Unity Catalog Server
if: always()
run: |
dev/teardown_server.sh