From f397747a346701a002760c21b39a989a55e87894 Mon Sep 17 00:00:00 2001 From: wasrusgen Date: Mon, 18 May 2026 12:33:35 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20UI=20Playwright=20smoke=20=D0=BF=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B5=20=D0=B4=D0=B5=D0=BF=D0=BB=D0=BE=D1=8F=20Pag?= =?UTF-8?q?es=20(workflow=5Frun)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Тригер: Deploy MiniApp to GitHub Pages → completed + success. Скриншот сохраняется как артефакт при провале. workflow_dispatch с опциональным SMOKE_URL для ручного запуска. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/smoke-ui.yml | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/smoke-ui.yml diff --git a/.github/workflows/smoke-ui.yml b/.github/workflows/smoke-ui.yml new file mode 100644 index 0000000..c27cfd1 --- /dev/null +++ b/.github/workflows/smoke-ui.yml @@ -0,0 +1,51 @@ +name: UI Smoke Tests (Playwright) + +# Запускается автоматически после каждого успешного деплоя GitHub Pages. +# Можно запустить вручную: Actions → UI Smoke Tests → Run workflow +on: + workflow_run: + workflows: ["Deploy MiniApp to GitHub Pages"] + types: [completed] + workflow_dispatch: + inputs: + url: + description: "URL для тестирования (пусто = https://wasrusgen.github.io/zov-tech/)" + required: false + default: "" + +jobs: + smoke-ui: + name: UI Smoke (Playwright) + runs-on: ubuntu-latest + + # При автозапуске — только если деплой прошёл успешно + if: > + github.event_name == 'workflow_dispatch' || + github.event.workflow_run.conclusion == 'success' + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + + - name: Установка зависимостей + run: npm ci + + - name: Установка Playwright (Chromium) + run: npx playwright install chromium --with-deps + + - name: Запуск UI smoke-теста + env: + SMOKE_URL: ${{ inputs.url || 'https://wasrusgen.github.io/zov-tech/' }} + run: node tests/ui_smoke.js + + - name: Загрузить скриншот при провале + if: failure() + uses: actions/upload-artifact@v4 + with: + name: smoke-screenshot + path: tests/ui_last_run.png + retention-days: 7