265fd33e9d
ci-deploy / build-deploy-test (push) Successful in 3m6s
release-verify.yml: three additions, all targeting the webzavod URL (no gnerim.ru in this workflow — release-verify e2e runs against the customer's deployed environment, not our internal preview). 1. Add /etc/hosts entry — flights-ui.devwebzavod.ru has no public DNS. Operator hosts resolve it via local /etc/hosts to 46.235.186.67. Without mirroring that on the runner every probe fails with "Could not resolve host" (runs 537 + 539). 2. Diagnose customer URL reachability — mirrors ci-deploy's tunnel probe but on the customer URL: surfaces broken /api wiring before the e2e suite spends 30 minutes hitting it. 3. Pre-warm /api cache — same rationale as ci-deploy: the four dictionary endpoints are read on every page load, and the upstream WAF rate-limits per source IP. Warm them once with sleeps so the e2e suite hits the customer's nginx cache, not the upstream WAF. schedule-route-buy-button.spec.ts: rewritten for ci-deploy run 538. The previous version hard-coded the first card on a URL that included today, hitting the "today's earliest flight is < 2h out, buy button hides" edge case. Now scans up to 8 cards looking for the buy button on a fully-future calendar week — proves the strip + button surface without depending on which specific rows are buyable on the day.
103 lines
4.0 KiB
YAML
103 lines
4.0 KiB
YAML
name: release-verify
|
|
|
|
# Workflow C: run after Jenkins has finished building (operator triggers manually).
|
|
# Probes the customer URL until it serves a fresh build, then runs the e2e suite
|
|
# against http://flights-ui.devwebzavod.ru with the console-error gate.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
env:
|
|
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
|
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Notify start
|
|
if: ${{ env.TELEGRAM_BOT_TOKEN != '' }}
|
|
run: scripts/ci/notify-telegram.sh start release-verify
|
|
|
|
- name: Setup Node + pnpm
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
- uses: pnpm/action-setup@v4
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Add hosts entry for customer URL
|
|
# `flights-ui.devwebzavod.ru` has no public DNS — operator hosts
|
|
# resolve it via local /etc/hosts to 46.235.186.67 (the customer's
|
|
# web ingress IP). Mirror that override on the runner so curl,
|
|
# node fetch, and Playwright's chromium can resolve the host.
|
|
# Without this, every probe fails with `Could not resolve host`.
|
|
run: echo "46.235.186.67 flights-ui.devwebzavod.ru" | sudo tee -a /etc/hosts
|
|
|
|
- name: Wait for customer URL
|
|
id: wait_customer
|
|
run: scripts/ci/wait-for-url.sh http://flights-ui.devwebzavod.ru/ru-ru/onlineboard 60 5
|
|
|
|
- name: Diagnose customer URL reachability
|
|
id: customer_diag
|
|
# Mirrors ci-deploy's tunnel-reachability probe but against the
|
|
# customer URL — surfaces /api wiring problems before the e2e
|
|
# suite spends 30 minutes hitting them.
|
|
run: |
|
|
echo "--- /api/health ---"
|
|
curl -sSI --max-time 10 http://flights-ui.devwebzavod.ru/api/health | head -10 || true
|
|
echo "--- /api/dictionary/1/world_regions (expect JSON, ~5KB) ---"
|
|
curl -sS --max-time 10 \
|
|
-w "\n[size=%{size_download} time=%{time_total}s code=%{http_code}]\n" \
|
|
http://flights-ui.devwebzavod.ru/api/dictionary/1/world_regions | head -c 400; echo
|
|
echo "--- second hit on the same dict (expect HIT if nginx caches) ---"
|
|
curl -sSI --max-time 10 \
|
|
http://flights-ui.devwebzavod.ru/api/dictionary/1/world_regions | grep -iE "^HTTP|x-cache|x-envoy" || true
|
|
|
|
- name: Pre-warm /api cache (dictionaries shared across e2e specs)
|
|
id: cache_warmup
|
|
# Same rationale as ci-deploy: every page load reads the four
|
|
# dictionary endpoints, and the upstream WAF rate-limits per
|
|
# source IP. Warm them once with sleeps so the e2e suite hits
|
|
# the customer's nginx cache instead of the upstream WAF.
|
|
run: |
|
|
for path in world_regions countries cities airports; do
|
|
url="http://flights-ui.devwebzavod.ru/api/dictionary/1/${path}"
|
|
rc=$(curl -sS --max-time 10 -o /dev/null -w "%{http_code}" "$url")
|
|
echo "warm $path -> HTTP $rc"
|
|
sleep 2
|
|
done
|
|
|
|
- name: Install Playwright browsers
|
|
id: playwright_install
|
|
run: pnpm exec playwright install --with-deps chromium
|
|
|
|
- name: Run Playwright e2e against customer URL
|
|
id: e2e_customer
|
|
env:
|
|
BASE_URL: http://flights-ui.devwebzavod.ru
|
|
run: pnpm test:e2e
|
|
|
|
- name: Upload artifacts on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: release-verify-failure-${{ github.run_id }}
|
|
path: |
|
|
playwright-report/
|
|
retention-days: 7
|
|
|
|
- name: Notify (success)
|
|
if: success() && env.TELEGRAM_BOT_TOKEN != ''
|
|
run: scripts/ci/notify-telegram.sh ok release-verify "customer URL e2e green"
|
|
|
|
- name: Notify (failure)
|
|
if: failure() && env.TELEGRAM_BOT_TOKEN != ''
|
|
run: scripts/ci/notify-telegram.sh fail release-verify "see Gitea run for Playwright report"
|