Skip to content

feat(warmup): add sliding usage window warm-up scheduler with multi-a… #1567

feat(warmup): add sliding usage window warm-up scheduler with multi-a…

feat(warmup): add sliding usage window warm-up scheduler with multi-a… #1567

Workflow file for this run

name: CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
permissions:
contents: read
jobs:
hook-integrity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate pre-commit hook references
run: python dev/scripts/validate_pre_commit_hooks.py
routing-unification-compliance:
needs: hook-integrity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run routing unification compliance gate
run: |
python dev/scripts/check_routing_unification_compliance.py
test-core:
needs: hook-integrity
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check boundary types
run: |
python dev/scripts/check_boundary_types.py
- name: Run unit tests with coverage
env:
OPENAI_API_KEY: dummy_key
GEMINI_API_KEY: dummy_key
ANTHROPIC_API_KEY: dummy_key
OPENROUTER_API_KEY: dummy_key
run: |
python -m pytest -v \
tests/unit/core/app \
tests/unit/core/cli_support \
tests/unit/core/common \
tests/unit/core/di \
tests/unit/connectors/gemini_base \
tests/unit/connectors/openai_codex \
tests/unit/chat_completions_tests/test_gemini_api_compatibility_di.py \
tests/unit/test_app_startup.py \
--ignore=tests/unit/connectors/gemini_base/test_credential_coordinator.py \
--cov=src --cov-branch --cov-report=xml
- name: Run integration tests with coverage append
env:
OPENAI_API_KEY: dummy_key
GEMINI_API_KEY: dummy_key
ANTHROPIC_API_KEY: dummy_key
OPENROUTER_API_KEY: dummy_key
run: |
if python - <<'PY'
from importlib.metadata import entry_points
oauth_entry_points = [
ep for ep in entry_points(group="llm_proxy.backends")
if "oauth" in ep.name.lower()
]
raise SystemExit(0 if oauth_entry_points else 1)
PY
then
python -m pytest -v tests/integration/test_oauth_connector_filtering.py --cov=src --cov-branch --cov-append --cov-report=xml
else
echo "No OAuth plugin entry points detected; skipping OAuth-only integration tests."
fi
- name: Upload combined coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: matdev83/llm-interactive-proxy
files: ./coverage.xml
fail_ci_if_error: false
plugin-boundary:
needs: hook-integrity
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
env:
OAUTH_PLUGIN_INSTALL_TARGET: llm-interactive-proxy-oauth-connectors
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install core dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install OAuth plugin package
run: |
pip install "${OAUTH_PLUGIN_INSTALL_TARGET}" || \
echo "OAuth plugin package unavailable on index; continuing with fail-open boundary checks."
- name: Run plugin-boundary verification tests
run: |
python -m pytest -v \
tests/unit/core/common/test_oauth_packaging_contract.py \
tests/unit/core/common/test_backend_discovery_state.py \
tests/unit/core/services/test_backend_plugin_discovery.py \
tests/unit/core/services/test_backend_registry_oauth_errors.py
if python - <<'PY'
from importlib.metadata import entry_points
oauth_entry_points = [
ep for ep in entry_points(group="llm_proxy.backends")
if "oauth" in ep.name.lower()
]
raise SystemExit(0 if oauth_entry_points else 1)
PY
then
echo "OAuth plugin entry points detected; running integration boundary checks."
python -m pytest -v tests/integration/test_oauth_connector_filtering.py
else
echo "No OAuth plugin entry points detected; skipping OAuth-only integration boundary checks."
fi
test-extended-nonblocking:
needs: hook-integrity
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run extended unit suite (non-blocking)
env:
OPENAI_API_KEY: dummy_key
GEMINI_API_KEY: dummy_key
ANTHROPIC_API_KEY: dummy_key
OPENROUTER_API_KEY: dummy_key
run: |
python -m pytest -v tests/unit