Files
huike-e2e-moicen/scripts/production-remote-check.sh
weli cfe60ebbb1 ci: add production smoke test workflow (manual + daily cron)
- New workflow `production Smoke` with workflow_dispatch + daily schedule
  (05:00 UTC). Does NOT run on push/PR.
- Runs smoke-http, guest-onboarding, home-shell, and unauthenticated
  store tests against music-room.huiwings.cn.
- Includes optional SSH health check (if PROD_SSH_* secrets configured).
- Also makes smoke-http testOrgId configurable via PROD_ORG_ID env var
  for cross-environment use (moicen vs huiwings).
- Adds production-remote-check.sh script.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 15:38:15 +08:00

42 lines
713 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 正式服只读健康检查
# 由 GitHub Actionsplaywright-production.yml)通过 SSH 调用
set -euo pipefail
echo "=== htykc ==="
if ps aux | grep -q '[h]tykc'; then
echo "htykc: RUNNING"
ps aux | grep '[h]tykc' | awk '{print $2, $8, $11}'
else
echo "htykc: NOT RUNNING"
exit 1
fi
echo ""
echo "=== htyproc ==="
if ps aux | grep -q '[h]typroc'; then
echo "htyproc: RUNNING"
else
echo "htyproc: NOT RUNNING (optional)"
fi
echo ""
echo "=== nginx ==="
nginx -t 2>&1 || sudo nginx -t 2>&1
echo ""
echo "=== disk ==="
df -h / | tail -1
echo ""
echo "=== load ==="
uptime
echo ""
echo "=== memory ==="
free -h | grep -v Swap
echo ""
echo "=== ALL CHECKS PASSED ==="