개선: 배포 검증과 관리자 UX 안정화
TaxBaik Browser E2E / browser-e2e (push) Failing after 1m3s
TaxBaik CI/CD / build-and-deploy (push) Failing after 2m46s

This commit is contained in:
2026-06-27 20:57:09 +09:00
parent 64b08831e8
commit f29f2c3cff
51 changed files with 948 additions and 199 deletions
+12
View File
@@ -54,3 +54,15 @@ jobs:
E2E_ADMIN_USERNAME: admin
E2E_ADMIN_PASSWORD: ${{ secrets.TAXBAIK_ADMIN_TEST_PASSWORD }}
run: npm run test:e2e
- name: Browser E2E summary
if: always()
run: |
echo "Executed tests:"
echo "- admin-login"
echo "- admin-smoke"
echo "- public-smoke"
echo "- blog-seo"
echo "- contact-submit"
echo "- inquiry-detail"
echo "- admin-password-change"
+15 -1
View File
@@ -138,15 +138,25 @@ jobs:
ADMIN_TEST_PASSWORD="${{ secrets.TAXBAIK_ADMIN_TEST_PASSWORD }}"
HOME_STATUS="000"
LOGIN_STATUS="000"
BLOG_STATUS="000"
BLOG_HEADERS=""
BLOG_BODY=""
BLOG_FINAL_URL=""
AUTH_BODY=""
for i in $(seq 1 12); do
HOME_STATUS=$(ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes "$DEPLOY_USER@$DEPLOY_HOST" "curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:5001/taxbaik/" || echo "000")
LOGIN_STATUS=$(ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes "$DEPLOY_USER@$DEPLOY_HOST" "curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:5001/taxbaik/admin/login" || echo "000")
if [ "$HOME_STATUS" = "200" ] && [ "$LOGIN_STATUS" = "200" ]; then
BLOG_STATUS_AND_URL=$(ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes "$DEPLOY_USER@$DEPLOY_HOST" "curl -s -L -D /tmp/taxbaik_blog_check.headers -o /tmp/taxbaik_blog_check.html -w '%{http_code} %{url_effective}' http://127.0.0.1:5001/taxbaik/blog/accountant-mistakes-5" || echo "000")
BLOG_STATUS=$(printf '%s' "$BLOG_STATUS_AND_URL" | awk '{print $1}')
BLOG_FINAL_URL=$(printf '%s' "$BLOG_STATUS_AND_URL" | awk '{print $2}')
BLOG_HEADERS=$(ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes "$DEPLOY_USER@$DEPLOY_HOST" "sed -n '1,12p' /tmp/taxbaik_blog_check.headers | tr '\n' ' '" || echo "")
BLOG_BODY=$(ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes "$DEPLOY_USER@$DEPLOY_HOST" "sed -n '1,12p' /tmp/taxbaik_blog_check.html | tr '\n' ' '" || echo "")
if [ "$HOME_STATUS" = "200" ] && [ "$LOGIN_STATUS" = "200" ] && [ "$BLOG_STATUS" = "200" ]; then
AUTH_BODY=$(ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes "$DEPLOY_USER@$DEPLOY_HOST" "python3 -c \"import json, urllib.request; req = urllib.request.Request('http://127.0.0.1:5001/taxbaik/api/auth/login', data=json.dumps({'username':'admin','password':'${ADMIN_TEST_PASSWORD}'}).encode(), headers={'Content-Type':'application/json'}, method='POST'); print(urllib.request.urlopen(req, timeout=20).read().decode())\"" || echo "")
if echo "$AUTH_BODY" | grep -q '"token"'; then
echo "Home Status: $HOME_STATUS"
echo "Login Status: $LOGIN_STATUS"
echo "Blog Status: $BLOG_STATUS"
echo "Auth Body: $AUTH_BODY"
echo "✓ Service is running"
exit 0
@@ -156,6 +166,10 @@ jobs:
done
echo "Home Status: $HOME_STATUS"
echo "Login Status: $LOGIN_STATUS"
echo "Blog Status: $BLOG_STATUS"
echo "Blog Final URL: $BLOG_FINAL_URL"
echo "Blog Headers: $BLOG_HEADERS"
echo "Blog Body: $BLOG_BODY"
echo "Auth Body: $AUTH_BODY"
echo "Service verification failed; collecting remote service diagnostics..." >&2
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes "$DEPLOY_USER@$DEPLOY_HOST" "systemctl is-active taxbaik; systemctl status taxbaik --no-pager -l | sed -n '1,120p'; journalctl -u taxbaik --no-pager -n 120" || true