Files
websitedev/scripts/pre-deploy-tests.sh
T
Do Siki d908f6b1b4
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
chore(quality): type-check and lint gates in pre-deploy, clean lint/tsc
- pre-deploy suite now runs tsc --noEmit and eslint; any failure aborts
  the release
- fix all TypeScript errors (FooterConfig.copyright removed after the CMS
  move; test guards/casts)
- fix all ESLint errors: <a>→<Link> and <img>→<Image> in Header/Footer,
  remove unused imports and explicit any in src
- eslint config relaxes no-explicit-any/no-require-imports/no-unused-vars
  for test and CommonJS config files (legitimate usage)

Closes MITHOME-81
2026-08-22 12:37:22 +02:00

56 lines
3.4 KiB
Bash
Executable File

#!/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"
run "proto: típusellenőrzés (tsc --noEmit)" bash -c "cd '${ROOT}/proto' && npx tsc --noEmit"
run "proto: lint (eslint)" bash -c "cd '${ROOT}/proto' && npm run lint"
# ── 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'