Skip to content

fix: litellm-compat for dynamiq integration tests (v0.4.8) (#13) #27

fix: litellm-compat for dynamiq integration tests (v0.4.8) (#13)

fix: litellm-compat for dynamiq integration tests (v0.4.8) (#13) #27

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
PYTHON_VERSION: "3.12"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install the package + dev + tokenize so mypy/pyright can resolve
# runtime deps (msgspec, httpx, aiohttp, orjson, tiktoken, ...).
pip install -e ".[dev,tokenize]"
- name: Run ruff check
run: ruff check arcllm tests
- name: Run ruff format check
run: ruff format --check arcllm tests
- name: Run mypy (strict)
run: mypy arcllm --strict
- name: Run pyright (strict)
run: pyright arcllm
unit-tests:
name: Unit Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# 3.10 is the floor we support; 3.12/3.13 are the active CPython
# release-and-current. 3.11 is implicitly compatible (no 3.11-only
# features used) but omitted from CI to save minutes.
python-version: ["3.10", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run unit tests with coverage
run: |
pytest tests/ \
--ignore=tests/integration \
-v \
--tb=short \
--cov=arcllm \
--cov-report=xml \
--cov-report=html \
--cov-report=term-missing \
--cov-fail-under=79 \
--junitxml=junit-${{ matrix.python-version }}.xml
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report-${{ matrix.python-version }}
path: |
coverage.xml
htmlcov/
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.python-version }}
path: junit-${{ matrix.python-version }}.xml
# Python 3.14 compatibility check (allowed to fail)
python314-compat:
name: Python 3.14-dev Compatibility
runs-on: ubuntu-latest
continue-on-error: true # Allowed to fail
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.14-dev
uses: actions/setup-python@v5
with:
python-version: "3.14-dev"
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio pytest-timeout
- name: Install package
run: pip install -e .
- name: Run basic import test
run: |
python -c "import arcllm; print(f'arcllm {arcllm.__version__} loaded successfully')"
- name: Run unit tests (Python 3.14)
run: |
pytest tests/ \
--ignore=tests/integration \
-v \
--tb=short \
--timeout=60 \
--junitxml=junit-3.14-dev.xml \
|| echo "::warning::Some tests failed on Python 3.14-dev"
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-3.14-dev
path: junit-3.14-dev.xml
benchmarks:
name: Performance Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run overhead microbenchmarks
run: |
python benchmarks/overhead.py 2>&1 | tee benchmark-results.txt
- name: Enforce overhead regression gates
run: |
python benchmarks/overhead.py --ci --json > overhead-results.json
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: |
benchmark-results.txt
overhead-results.json
streaming-stress-tests:
name: Streaming Stress Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run streaming stress tests
run: |
pytest tests/test_streaming_stress.py -v --tb=short --timeout=120
provider-unit-tests:
name: Provider Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Only providers with a `tests/providers/test_<name>.py` file. Adding a
# new provider here without the corresponding file will fail loudly
# rather than silently passing — that's the point.
provider:
- openai
- anthropic
- gemini
- mistral
- bedrock
- ollama
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run provider-specific tests
run: |
pytest tests/providers/test_${{ matrix.provider }}.py \
-v --tb=short \
--junitxml=junit-${{ matrix.provider }}.xml
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.provider }}
path: junit-${{ matrix.provider }}.xml
if-no-files-found: ignore
build:
name: Build Package
runs-on: ubuntu-latest
needs: [lint, unit-tests]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Verify wheel imports cleanly
run: |
python -m venv /tmp/wheel-smoke
/tmp/wheel-smoke/bin/pip install --quiet dist/*.whl
/tmp/wheel-smoke/bin/python -c "import arcllm; print(f'arcllm {arcllm.__version__} imported OK')"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/