diff --git a/.gitea/workflows/browser-e2e.yml b/.gitea/workflows/browser-e2e.yml index 3439a60..e0a6c64 100644 --- a/.gitea/workflows/browser-e2e.yml +++ b/.gitea/workflows/browser-e2e.yml @@ -47,16 +47,16 @@ jobs: echo "Expected short version: $SHORT_VERSION" for i in $(seq 1 20); do # Suppress stderr and allow failures to handle transition/down periods cleanly - VERSION_BODY="$(curl -fsS "http://${DEPLOY_HOST}/taxbaik/version.json" 2>/dev/null || true)" - BLOG_STATUS="$(curl -s -o /dev/null -w '%{http_code}' "http://${DEPLOY_HOST}/taxbaik/blog/accountant-mistakes-5" || true)" - LOGIN_STATUS="$(curl -s -o /dev/null -w '%{http_code}' "http://${DEPLOY_HOST}/taxbaik/admin/login" || true)" + VERSION_BODY="$(curl -fsS "https://www.taxbaik.com/taxbaik/version.json" 2>/dev/null || true)" + BLOG_STATUS="$(curl -s -o /dev/null -w '%{http_code}' "https://www.taxbaik.com/taxbaik/blog/accountant-mistakes-5" || true)" + LOGIN_STATUS="$(curl -s -o /dev/null -w '%{http_code}' "https://www.taxbaik.com/taxbaik/admin/login" || true)" if echo "$VERSION_BODY" | grep -q "\"version\": \"${SHORT_VERSION}\"" && [ "$BLOG_STATUS" = "200" ] && [ "$LOGIN_STATUS" = "200" ]; then echo "✓ Deployment ready for ${SHORT_VERSION} (attempt $i/20)" - ROOT_URL="http://${DEPLOY_HOST}/" \ - ADMIN_URL="http://${DEPLOY_HOST}/taxbaik/admin/login" \ + ROOT_URL="https://www.taxbaik.com/" \ + ADMIN_URL="https://www.taxbaik.com/taxbaik/admin/login" \ PUBLIC_MARKER="백원숙 세무회계" \ PUBLIC_FORBIDDEN="관리자" \ - ADMIN_MARKER="TaxBaik Admin" \ + ADMIN_MARKER="관리자 로그인" \ MAX_RETRIES=1 \ bash ./scripts/taxbaik-smoke.sh exit 0 @@ -72,43 +72,41 @@ jobs: - name: Browser Smoke verification env: # Green-Blue 배포 지원: Nginx를 통해 active 포트로 라우팅 - E2E_BASE_URL: http://${{ secrets.DEPLOY_HOST }}/taxbaik + E2E_BASE_URL: https://www.taxbaik.com/taxbaik # E2E 테스트는 test_admin 테스트 계정 사용 (실 admin 계정과 분리) E2E_ADMIN_USERNAME: test_admin - E2E_ADMIN_PASSWORD: TestAdmin@123456 + E2E_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD }} run: | echo "Running smoke checks on Desktop Chrome (production verification)" npm run test:e2e:public-smoke npm run test:e2e:admin-smoke - echo "Smoke failed: verify public root and /taxbaik/admin/login body markers." - name: Browser E2E verification env: # Green-Blue 배포 지원: Nginx를 통해 active 포트로 라우팅 - E2E_BASE_URL: http://${{ secrets.DEPLOY_HOST }}/taxbaik + E2E_BASE_URL: https://www.taxbaik.com/taxbaik # E2E 테스트는 test_admin 테스트 계정 사용 (실 admin 계정과 분리) E2E_ADMIN_USERNAME: test_admin - E2E_ADMIN_PASSWORD: TestAdmin@123456 + E2E_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD }} run: | echo "Running full E2E on Desktop Chrome (production verification)" npx playwright test --project="Desktop Chrome" --reporter=html --reporter=list - name: API smoke verification env: - DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }} E2E_ADMIN_USERNAME: test_admin - E2E_ADMIN_PASSWORD: TestAdmin@123456 + E2E_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD }} run: | set -e - TOKEN="$(curl -s -X POST "http://${DEPLOY_HOST}/taxbaik/api/auth/login" -H "Content-Type: application/json" -d "{\"username\":\"${E2E_ADMIN_USERNAME}\",\"password\":\"${E2E_ADMIN_PASSWORD}\"}" | python3 -c 'import sys, json; print(json.load(sys.stdin)["accessToken"])')" + TOKEN="$(curl -s -X POST "https://www.taxbaik.com/taxbaik/api/auth/login" -H "Content-Type: application/json" -d "{\"username\":\"${E2E_ADMIN_USERNAME}\",\"password\":\"${E2E_ADMIN_PASSWORD}\"}" | python3 -c 'import sys, json; print(json.load(sys.stdin)["accessToken"])')" test -n "$TOKEN" - curl -fsS -H "Authorization: Bearer $TOKEN" "http://${DEPLOY_HOST}/taxbaik/api/blog/admin?page=1&pageSize=1" >/dev/null - curl -fsS -H "Authorization: Bearer $TOKEN" "http://${DEPLOY_HOST}/taxbaik/api/faq" >/dev/null - curl -fsS -H "Authorization: Bearer $TOKEN" "http://${DEPLOY_HOST}/taxbaik/api/announcement" >/dev/null - curl -fsS -H "Authorization: Bearer $TOKEN" "http://${DEPLOY_HOST}/taxbaik/api/inquiry?page=1&pageSize=1" >/dev/null - curl -fsS "http://${DEPLOY_HOST}/taxbaik/favicon.svg" >/dev/null - curl -fsS "http://${DEPLOY_HOST}/taxbaik/favicon.ico" >/dev/null - curl -fsS "http://${DEPLOY_HOST}/taxbaik/robots.txt" >/dev/null + curl -fsS -H "Authorization: Bearer $TOKEN" "https://www.taxbaik.com/taxbaik/api/blog/admin?page=1&pageSize=1" >/dev/null + curl -fsS -H "Authorization: Bearer $TOKEN" "https://www.taxbaik.com/taxbaik/api/faq" >/dev/null + curl -fsS -H "Authorization: Bearer $TOKEN" "https://www.taxbaik.com/taxbaik/api/announcement" >/dev/null + curl -fsS -H "Authorization: Bearer $TOKEN" "https://www.taxbaik.com/taxbaik/api/inquiry?page=1&pageSize=1" >/dev/null + curl -fsS "https://www.taxbaik.com/taxbaik/favicon.svg" >/dev/null + curl -fsS "https://www.taxbaik.com/taxbaik/favicon.ico" >/dev/null + curl -fsS "https://www.taxbaik.com/taxbaik/robots.txt" >/dev/null - name: Browser E2E summary if: always()