Mandantenfähigkeit V1.1 #11

Merged
Lars merged 6 commits from develop into main 2026-05-05 23:11:50 +02:00
4 changed files with 46 additions and 51 deletions
Showing only changes of commit f03330bf77 - Show all commits

View File

@ -10,61 +10,36 @@ on:
types: [completed] types: [completed]
jobs: jobs:
# Checkout + PostgreSQL-Service + Migrationen + pytest (Unit + Mandanten-Integration). # Wie Mitai-Jinkendo: pytest im laufenden backend-Container (Python aus Image, gleiche DB wie Deploy).
# Unabhängig von Self-Host-Pfaden unter lint-backend/build-frontend.
pytest-backend: pytest-backend:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: shinkan_ci
POSTGRES_PASSWORD: shinkan_ci_secret
POSTGRES_DB: shinkan_ci
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U shinkan_ci -d shinkan_ci"
--health-interval 5s
--health-timeout 5s
--health-retries 12
env:
DB_HOST: postgres
DB_PORT: "5432"
DB_NAME: shinkan_ci
DB_USER: shinkan_ci
DB_PASSWORD: shinkan_ci_secret
ACCESS_LAYER_INTEGRATION: "1"
steps: steps:
- uses: actions/checkout@v4 - name: Backend pytest im deployten Container
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Backend-Abhängigkeiten installieren
run: | run: |
cd backend EVENT_NAME="${{ github.event_name }}"
python -m pip install --upgrade pip REF_NAME="${{ github.ref_name }}"
pip install -r requirements.txt -r requirements-dev.txt RUN_WORKFLOW="${{ github.event.workflow_run.name }}"
APP_DIR="/home/lars/docker/shinkan"
COMPOSE_FILE="docker-compose.yml"
- name: Access-layer Router-Hinweis (strikt) if [ "$EVENT_NAME" = "workflow_run" ]; then
env: if [ "$RUN_WORKFLOW" = "Deploy Development" ]; then
ACCESS_LAYER_STRICT: "1" APP_DIR="/home/lars/docker/shinkan-dev"
run: python backend/scripts/check_access_layer_hints.py COMPOSE_FILE="docker-compose.dev-env.yml"
fi
elif [ "$REF_NAME" = "develop" ]; then
APP_DIR="/home/lars/docker/shinkan-dev"
COMPOSE_FILE="docker-compose.dev-env.yml"
fi
- name: Datenbankmigrationen anwenden cd "$APP_DIR"
run: | docker compose -f "$COMPOSE_FILE" exec -T backend sh -lc "
cd backend pip install -r /app/requirements-dev.txt &&
python run_migrations.py cd /app &&
ACCESS_LAYER_STRICT=1 python scripts/check_access_layer_hints.py &&
- name: pytest (Unit + Integration) ACCESS_LAYER_INTEGRATION=1 SKIP_DB_MIGRATE=1 python -m pytest tests -m 'not slow' -ra -vv --tb=short
env: "
SKIP_DB_MIGRATE: "1"
run: |
cd backend
python -m pytest tests/ -v --tb=short
lint-backend: lint-backend:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}

View File

@ -1,5 +1,10 @@
[pytest] [pytest]
testpaths = tests testpaths = tests
pythonpath = . pythonpath = .
python_files = test_*.py
python_functions = test_*
addopts = -q --tb=short
markers = markers =
integration: PostgreSQL-Mandanten-Integration (ACCESS_LAYER_INTEGRATION=1) smoke: Schnelle Kern-Regression.
integration: PostgreSQL-Mandanten-Integration (ACCESS_LAYER_INTEGRATION=1).
slow: Lange/schwere Tests; in CI wie Mitai-Jinkendo ausgeschlossen (Auswahl: not slow).

View File

@ -1,6 +1,6 @@
# Shinkan Jinkendo Version Information # Shinkan Jinkendo Version Information
APP_VERSION = "0.8.31" APP_VERSION = "0.8.33"
BUILD_DATE = "2026-05-05" BUILD_DATE = "2026-05-05"
DB_SCHEMA_VERSION = "20260505041" DB_SCHEMA_VERSION = "20260505041"
@ -27,6 +27,21 @@ MODULE_VERSIONS = {
} }
CHANGELOG = [ CHANGELOG = [
{
"version": "0.8.33",
"date": "2026-05-05",
"changes": [
"CI pytest-backend wie Mitai-Jinkendo: docker compose exec backend (deployte Stacks shinkan / shinkan-dev); keine Runner-Python/Postgres-Service",
"pytest.ini: Marker smoke/slow, addopts/-q wie Schwesterprojekt; CI: -m \"not slow\", ACCESS_LAYER_STRICT + Integration im Container",
],
},
{
"version": "0.8.32",
"date": "2026-05-05",
"changes": [
"CI pytest-backend: kein setup-python — venv aus System-python3 (arm64/Debian Self-Host, Raspi)",
],
},
{ {
"version": "0.8.31", "version": "0.8.31",
"date": "2026-05-05", "date": "2026-05-05",

View File

@ -1,6 +1,6 @@
// Shinkan Jinkendo Frontend Version // Shinkan Jinkendo Frontend Version
export const APP_VERSION = "0.8.31" export const APP_VERSION = "0.8.33"
export const BUILD_DATE = "2026-05-05" export const BUILD_DATE = "2026-05-05"
export const PAGE_VERSIONS = { export const PAGE_VERSIONS = {