deepseek_adapter.py had never been importable: it referenced ProviderAdapter and ProfileConfig, neither of which exists in src/, and profile.extra, which RouterProfileConfig does not define. Rewritten against BaseProviderAdapter with the three missing abstract methods and registered as "deepseek". Adds tests/test_import_invariants.py, which walks every shipped module and fails on broken internal references while skipping absent optional GUI extras. It also asserts that test modules importing customtkinter call pytest.importorskip, since a missing guard aborts collection of the whole session and takes the release gate with it. Adds a headless CI job that uninstalls customtkinter and runs the suite, so that invariant is enforced rather than remembered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
test:
|
|
name: Clean Windows Runner Test
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e .[dev]
|
|
|
|
- name: Code Quality (ruff)
|
|
run: |
|
|
ruff check .
|
|
|
|
- name: Run Hermetic Offline Pytest Suite
|
|
run: |
|
|
pytest -v
|
|
|
|
- name: Run Automated Release Gate
|
|
run: |
|
|
python scripts/release_gate.py
|
|
|
|
headless:
|
|
name: Headless Run (no GUI dependencies)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies without GUI extras
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e .[dev]
|
|
pip uninstall -y customtkinter
|
|
|
|
# A test module importing customtkinter at module scope aborts collection
|
|
# of the WHOLE session instead of skipping itself, which takes the release
|
|
# gate down with it. This job fails if that guard is ever dropped again.
|
|
- name: Suite must skip, not abort, without GUI dependencies
|
|
run: |
|
|
pytest -q
|