Files
websitedev/scripts/pre-deploy-tests.sh
Do SikiandClaude Sonnet 5 12b2711168
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Canceled after 0s
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Canceled after 0s
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Canceled after 0s
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Canceled after 0s
chore: retire legacy custom CMS (content-editor.js) (MITHOME-93)
Removes the standalone, git-push-based content editor that predates
Payload CMS: content-editor.js, its scripts/cms-*.js modules, its
scripts/test-content-editor-*.js + scripts/test-cms-publish.js test
suite, scripts/markdown-render.js (only used by the editor's guide
renderer), the proto-side test doubles (cms-editor-client.test.ts,
cms-editor-shortcuts.test.ts), and the editor's own user guide
(docs/felhasznaloi-utmutato.md).

Kept: proto/src/content/*.json (still the source for
migrate-content-to-payload.ts and test fixtures for Header/Footer,
per MITHOME-96), proto/src/content/schema.js + scripts/test-content-schema.js
(still validate those JSON files), and docs/content-editor-recovery.md
(historical incident record, not user-facing tool docs).

Safety net before deletion (per user request): added
proto/scripts/export-content-snapshot.ts, a reusable Payload Local API
exporter, and ran it to produce docs/backups/payload-content-snapshot-*.json
— a full hu/en snapshot of every Global + LegalPages + Partners document
at the moment of retirement. Also confirmed no data-loss risk otherwise:
.content-backups/ (the editor's own gitignored backup dir) tops out at
2026-08-23, well before today's fresh migration run, and every JSON
edit ever made through the editor already exists as its own git commit
("content: frissítve a CMS-ből").

Updated dangling references: pre-deploy-tests.sh and
.agent/steering/testing.md (dropped the CMS test block),
.agent/workflows/deploy.md (publish flow is now Payload draft/publish,
not git push), CLAUDE.md + .agent/AGENTS.md (dropped the /cms-feature
workflow, deleted alongside it), README.md (stack description),
.agent/steering/development-rules.md (the guide-maintenance rule no
longer has a guide to maintain).

Verified: tsc, lint, proto unit tests (51 passed), root
test-content-schema.js, plane-sync unit tests, production build all
green after the deletion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 21:48:50 +02:00

51 lines
2.8 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 ──────────────────────────────────────────────────────────────────────
# WHY nincs itt önálló CMS-tesztblokk: a régi egyedi CMS-t (content-editor.js
# + scripts/cms-*.js + a hozzá tartozó test-content-editor-*.js szkriptek)
# a Payload CMS-re állás (MITHOME-91/92) után leépítettük (MITHOME-93) — a
# Payload admin felület saját, upstream teszteléssel rendelkezik, ezt itt nem
# duplikáljuk. Payload collection/global konfigurációk saját tesztlefedettsége
# külön feladat (MITHOME-96), még nincs implementálva.
# ── 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'