Skip to content

feat: Code Quality Improvements & Documentation Overhaul #1

feat: Code Quality Improvements & Documentation Overhaul

feat: Code Quality Improvements & Documentation Overhaul #1

Workflow file for this run

name: Code Quality
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
code-quality:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black flake8 mypy isort
pip install -r requirements.txt
- name: Run Black (Code Formatting)
run: black --check --diff .
- name: Run isort (Import Sorting)
run: isort --check-only --diff .
- name: Run Flake8 (Linting)
run: flake8 . --max-line-length=88 --ignore=E203,W503 --exclude=.venv,venv,__pycache__,.git
- name: Run MyPy (Type Checking)
run: mypy . --ignore-missing-imports --no-strict-optional
continue-on-error: true # Allow MyPy to fail without stopping the workflow
- name: Test Import Structure
run: |
python -c "import coderag.config; print('✓ Config import successful')"
python -c "import coderag.embeddings; print('✓ Embeddings import successful')"
python -c "import coderag.index; print('✓ Index import successful')"
python -c "import coderag.search; print('✓ Search import successful')"
python -c "import coderag.monitor; print('✓ Monitor import successful')"
env:
OPENAI_API_KEY: dummy-key-for-testing