diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d9f4c3e..c6206ec 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -15,7 +15,9 @@ jobs: - name: Ampel — erkennt Projekt-Typ selbst und prüft entsprechend shell: bash run: | - set -uo pipefail + # Der Runner startet bash mit -e — das schalten wir ab: die Ampel wertet + # JEDEN Fehler selbst (rot=1) und liefert am Ende EIN Klartext-Urteil. + set -u +e rot=0 py_datei=$(find . -name '*.py' -not -path './.git/*' -not -path '*/node_modules/*' -print -quit) pkg_dateien=$(find . -name package.json -not -path '*/node_modules/*' -not -path './.git/*') @@ -27,8 +29,8 @@ jobs: if [ -n "$py_datei" ]; then echo "== Python erkannt ==" - python3 -m venv /tmp/ampel-venv && . /tmp/ampel-venv/bin/activate - pip install -q ruff pytest + { python3 -m venv /tmp/ampel-venv && . /tmp/ampel-venv/bin/activate; } || { echo "❌ Python-Setup kaputt (venv)"; exit 1; } + pip install -q ruff pytest || { echo "❌ Werkzeug-Installation kaputt"; exit 1; } echo "-- Ruff (Linter: toter Code, kaputte Imports, Schlampereien)" ruff check . || rot=1 echo "-- Abhängigkeiten installierbar? (halluzinierte Pakete fliegen hier auf)" @@ -39,7 +41,7 @@ jobs: echo "-- Importierbar? (kaputte Modul-Struktur fliegt hier auf)" python -m compileall -q . || rot=1 echo "-- Pytest (keine Tests gefunden = ROT)" - pytest -q; ec=$? + ec=0; pytest -q || ec=$? if [ $ec -eq 5 ]; then echo "❌ KEINE TESTS GEFUNDEN — Tests sind Pflicht, kein Deko (AGENTS.md)." rot=1