Files
DeepTutor/.github/workflows/tests.yml
Bingxi Zhao fb94bc2ec3 fix lint
2026-01-15 03:34:36 +08:00

69 lines
2.1 KiB
YAML

name: Tests
on:
push:
branches:
- main
- develop
paths:
- "src/**"
- "tests/**"
- "requirements.txt"
- "pyproject.toml"
- ".github/workflows/tests.yml"
pull_request:
branches:
- main
- develop
paths:
- "src/**"
- "tests/**"
- "requirements.txt"
- "pyproject.toml"
jobs:
# Quick import check to ensure modules load correctly
# Uses minimal dependencies to avoid disk space issues
import-check:
name: Import Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install minimal dependencies for import check
run: |
python -m pip install --upgrade pip
# Install only the core dependencies needed for import checks
# Avoid heavy packages like llama-index to prevent disk space issues
pip install \
python-dotenv>=1.0.0 \
PyYAML>=6.0 \
tiktoken>=0.5.0 \
jinja2>=3.1.0 \
requests>=2.32.2 \
openai>=1.30.0 \
aiohttp>=3.9.4 \
httpx>=0.27.0 \
nest_asyncio>=1.5.8 \
tenacity>=8.0.0 \
fastapi>=0.100.0 \
pydantic>=2.0.0 \
numpy>=1.24.0,\<2.0.0
- name: Check module imports
run: |
python -c "from src.services.llm import complete, stream, fetch_models, sanitize_url; print('✅ LLM service imports OK')"
python -c "from src.services.llm.config import get_llm_config; print('✅ LLM config imports OK')"
python -c "from src.services.config.loader import load_config_with_main; print('✅ Config loader imports OK')"
python -c "from src.services.config.unified_config import UnifiedConfigManager; print('✅ Unified config imports OK')"
python -c "from src.logging import get_logger; print('✅ Logging imports OK')"
env:
PYTHONPATH: ${{ github.workspace }}