Skip to content

Add retry/fallback resilience and thinking token budget #27

Add retry/fallback resilience and thinking token budget

Add retry/fallback resilience and thinking token budget #27

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ matrix.python-version }}-
- name: Create virtual environment
run: python -m venv .venv
shell: bash
- name: Install dependencies
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
source .venv/Scripts/activate
else
source .venv/bin/activate
fi
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
shell: bash
- name: Test core imports
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
source .venv/Scripts/activate
else
source .venv/bin/activate
fi
python -c "from mini_rag import CodeEmbedder, ProjectIndexer, CodeSearcher; print('Core imports OK')"
python -c "from mini_rag.deep_research import DeepResearchEngine; print('Deep research OK')"
python -c "from mini_rag.web_scraper import MiniWebScraper; print('Web scraper OK')"
python -c "from mini_rag.rate_limiter import RateLimiter; print('Rate limiter OK')"
python -c "from mini_rag.config import ConfigManager; print('Config OK')"
shell: bash
- name: Run test suite
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
source .venv/Scripts/activate
else
source .venv/bin/activate
fi
# Run the fixes test (comprehensive validation)
if [ -f "tests/test_fixes.py" ]; then
python tests/test_fixes.py
fi
# Test config system
python -c "from mini_rag.config import ConfigManager; import tempfile; d=tempfile.mkdtemp(); c=ConfigManager(d); c.load_config(); print('Config system OK')"
shell: bash
- name: Test CLI entry point
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
source .venv/Scripts/activate
else
source .venv/bin/activate
fi
rag-mini --help
rag-mini info
shell: bash
security-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install security tools
run: pip install bandit
- name: Run security scan
run: bandit -r mini_rag/ -ll