feat(test): comprehensive pre-deploy test suite as single entry point
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions

scripts/pre-deploy-tests.sh runs every local test group before a deploy:
proto unit (jest), content schema validation, all CMS integration suites
(security, serializer, save, optimistic lock, versions, logo, login, logout,
guide, bottom bar), publish command/integration and plane sync unit tests.
Per-group PASS/FAIL summary; non-zero exit on any failure.

deploy_to_stage_on_local.sh now runs the full suite as step 1 — a failing
group aborts the release before push. Deploy workflow docs updated.

Closes MITHOME-70
This commit is contained in:
Do Siki
2026-08-19 14:15:33 +02:00
parent 067b15c50e
commit 5db71998eb
3 changed files with 58 additions and 5 deletions
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env bash
# Teljeskörű pre-deploy tesztkészlet — minden deploy előtt futtatandó.
# Összefogja a proto (weboldal) és a gyökér (CMS/infra) lokális tesztjeit;
# csoportonkénti PASS/FAIL összegzéssel, hiba esetén nem-nulla exit kód.
#
# Használat: scripts/pre-deploy-tests.sh
# A deploy_to_stage_on_local.sh 1. lépésként futtatja.
set -uo pipefail
readonly ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
FAILED=()
run() {
local name="$1"; shift
printf '\n── %s\n' "$name"
if "$@"; then
printf '✅ %s\n' "$name"
else
printf '❌ %s\n' "$name"
FAILED+=("$name")
fi
}
# ── Weboldal (proto) ─────────────────────────────────────────────────────────
run "proto: unit tesztek (jest, 60+)" bash -c "cd '${ROOT}/proto' && npm test --silent"
# ── Tartalom ─────────────────────────────────────────────────────────────────
run "content: séma-validáció (minden JSON)" node "${ROOT}/scripts/test-content-schema.js"
# ── CMS (content-editor) ─────────────────────────────────────────────────────
run "cms: security guard (auth, CSRF, XFF)" node "${ROOT}/scripts/test-content-editor-security.js"
run "cms: serializer regresszió (collect/reindex)" node "${ROOT}/scripts/test-content-editor-serializer.js"
run "cms: atomikus mentés + backup" node "${ROOT}/scripts/test-content-editor-save.js"
run "cms: optimista zárolás (409, hash-frissítés)" node "${ROOT}/scripts/test-content-editor-conflict.js"
run "cms: verziók panel (diff, restore)" node "${ROOT}/scripts/test-content-editor-versions.js"
run "cms: logó feltöltés (PNG, backup, audit)" node "${ROOT}/scripts/test-content-editor-logo.js"
run "cms: login flow (session, Safari-scenariok)" node "${ROOT}/scripts/test-content-editor-login.js"
run "cms: logout + rate-limit" node "${ROOT}/scripts/test-content-editor-logout.js"
run "cms: guide endpoint + renderer" node "${ROOT}/scripts/test-content-editor-guide.js"
run "cms: alsó sáv layout guard" node "${ROOT}/scripts/test-content-editor-bottombar.js"
run "cms: publish parancs + integráció" node "${ROOT}/scripts/test-cms-publish.js"
# ── Infra ────────────────────────────────────────────────────────────────────
run "plane: sync unit tesztek" node --test "${ROOT}/scripts/plane/plane-sync.test.js"
# ── Összegzés ────────────────────────────────────────────────────────────────
printf '\n────────────────────────────────────────\n'
if [ "${#FAILED[@]}" -gt 0 ]; then
printf '❌ %d tesztcsoport HIBÁS: %s\n' "${#FAILED[@]}" "${FAILED[*]}"
exit 1
fi
printf '✅ Minden pre-deploy teszt zöld.\n'