Files
LegacyHUB/.github/workflows/ci.yml
Vadim Malanov 9af557c26a
Some checks failed
CI / Backend (lint + tests + compose) (push) Has been cancelled
CI / Frontend (lint + type-check + build) (push) Has been cancelled
ci: update actions to Node 24 runtime
2026-06-15 10:16:08 +03:00

83 lines
2.2 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
backend:
name: Backend (lint + tests + compose)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: "pip"
- name: Install (light deps only, skip ocrmypdf/docling/torch)
run: |
python -m pip install --upgrade pip
pip install \
"pydantic>=2.7" "pydantic-settings>=2.4" \
"sqlalchemy>=2.0.30" "psycopg[binary]>=3.2" \
"alembic>=1.13" "minio>=7.2.7" \
"opensearch-py>=2.6" "qdrant-client>=1.10" \
"celery>=5.4" "redis>=5.0" \
"fastapi>=0.115" "uvicorn[standard]>=0.30" \
"structlog>=24.2" "tenacity>=8.5" "langdetect>=1.0.9" \
"regex>=2024.5.15" "click>=8.1.7" \
"pytest>=8.2" "pytest-asyncio>=0.23" \
ruff
- name: Ruff
run: ruff check app scripts tests
- name: Compile
run: python -m compileall -q app scripts tests
- name: Pytest (unit only — heavy deps excluded)
run: |
pytest tests/test_hashing.py tests/test_quality.py \
tests/test_chunker.py tests/test_duplicates.py \
tests/test_hybrid_search.py -q
- name: docker compose config
run: docker compose config --quiet
- name: docker compose config (prod overlay)
run: |
test -f docker-compose.prod.yml && \
docker compose --env-file .env.prod.example \
-f docker-compose.yml -f docker-compose.prod.yml config --quiet || \
echo "prod overlay absent, skipping"
frontend:
name: Frontend (lint + type-check + build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: "20"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- name: ESLint
run: npm run lint
- name: TypeScript
run: npx tsc --noEmit
- name: Build
run: npx vite build