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>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
# 正式服只读健康检查
|
||||
# 由 GitHub Actions(playwright-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 ==="
|
||||
Reference in New Issue
Block a user