Skip to content

fix: Fraktionssitzung TOPs — gesamte Zeile öffnet Sidebar #57

fix: Fraktionssitzung TOPs — gesamte Zeile öffnet Sidebar

fix: Fraktionssitzung TOPs — gesamte Zeile öffnet Sidebar #57

Workflow file for this run

# =============================================================================
# Mandari - CI Checks
# =============================================================================
# Runs linting, tests, and Docker build validation
# Triggered on pushes to dev/main/beta and pull requests
# =============================================================================
name: CI
on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main
permissions:
contents: read
jobs:
# ===========================================================================
# Code Quality (Linting)
# ===========================================================================
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install linters
run: pip install ruff==0.14.6
- name: Run Ruff linter
working-directory: mandari
run: ruff check .
- name: Run Ruff formatter check
working-directory: mandari
run: ruff format --check .
# ===========================================================================
# Django System Checks & Tests
# ===========================================================================
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libcairo2-dev \
libpango1.0-dev \
libffi-dev \
shared-mime-info \
pkg-config \
poppler-utils \
tesseract-ocr \
tesseract-ocr-deu
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install dependencies
run: |
pip install shared/
cd mandari
pip install -r requirements.txt
pip install pytest pytest-django
- name: Run Django system checks
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
REDIS_URL: redis://localhost:6379
SECRET_KEY: test-secret-key-for-ci
DEBUG: 'false'
run: |
cd mandari
python manage.py check --deploy --fail-level WARNING 2>&1 || true
python manage.py check
- name: Run migrations
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
REDIS_URL: redis://localhost:6379
SECRET_KEY: test-secret-key-for-ci
DEBUG: 'false'
run: |
cd mandari
python manage.py migrate --noinput
- name: Collect static files
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
REDIS_URL: redis://localhost:6379
SECRET_KEY: test-secret-key-for-ci
DEBUG: 'false'
run: |
cd mandari
python manage.py collectstatic --noinput
- name: Run tests
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
REDIS_URL: redis://localhost:6379
SECRET_KEY: test-secret-key-for-ci
DEBUG: 'false'
run: |
cd mandari
pytest -v || echo "No tests found (yet)"
# ===========================================================================
# Docker Build Validation
# ===========================================================================
docker-build:
name: Docker Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build mandari image
uses: docker/build-push-action@v5
with:
context: .
file: ./mandari/Dockerfile
push: false
cache-from: type=gha,scope=mandari
cache-to: type=gha,scope=mandari,mode=max
- name: Build ingestor image
uses: docker/build-push-action@v5
with:
context: .
file: ./ingestor/Dockerfile
push: false
cache-from: type=gha,scope=ingestor
cache-to: type=gha,scope=ingestor,mode=max