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
scripts/check-ports.sh checks a port list or a compose file (locally or on a remote host over SSH) before anything is built or started; a port counts as owned only by the same compose project and service. deploy.sh runs it before the build; tests are part of the pre-deploy suite. Found: the dev compose clashes on llmdev (3001: step, 8081: mozdit staging). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
3.0 KiB
Bash
Executable File
53 lines
3.0 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"
|
|
run "infra: indexelhetőségi őr (MITHOME-127)" node --test "${ROOT}/scripts/check-indexability.test.js"
|
|
run "infra: port-ellenőrzés" node --test "${ROOT}/scripts/check-ports.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'
|