caterium-app/.github/workflows/support-form-check.yml
pavlov346346-source c3cb44419b
Add human support form with fixed email recipient (#40)
Add Help contact form and PHP mail endpoint for support@katerion.ru, with validated Reply-To, explicit diagnostics consent, CSRF/origin checks, hashed rate limits and duplicate protection. Preserve drafts on error and avoid serializing customer data or SDK internals. Full PR QA passed in 35559317001; isolated PHP and 30 browser cases passed in 35559179372. Standard production gates unchanged. Publication checks do not send real mail; inbox receipt remains unverified. No training photo assets or unfinished training lifecycle changes.
2026-09-21 07:12:26 +03:00

74 lines
2.7 KiB
YAML

name: Support form checks
on:
push:
branches: [feature/support-mail-20260921]
paths: [ops/finalize-support-form.py, '.github/workflows/support-form-check.yml']
workflow_run:
workflows: [Verify Caterium on Timeweb]
types: [completed]
permissions:
contents: read
jobs:
test:
if: github.event_name == 'push'
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Finalize feature-only source
run: |
set -euo pipefail
test "$GITHUB_REF_NAME" = 'feature/support-mail-20260921'
if [ -f ops/finalize-support-form.py ]; then
python ops/finalize-support-form.py
rm ops/finalize-support-form.py
fi
git diff --check
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: php -l public/api/support.php && php -l public/api/support-lib.php && php tests/support-mail.php
- run: node --check public/core/support-form.js && node --check public/core/help-center.js
- run: npx playwright install --with-deps chromium webkit
- run: npx playwright test --config=tests/playwright.config.mjs tests/support-form.spec.mjs tests/help-center.spec.mjs --reporter=list
- name: Save verified source to feature branch only
run: |
set -euo pipefail
git config user.name 'Caterium support verification'
git config user.email 'caterium-verification@users.noreply.github.com'
git add public/core/support-form.js public/service-worker.js tests/support-form.spec.mjs
git add -u ops/
if ! git diff --cached --quiet; then
git commit -m 'Finalize verified support mail lifecycle and cache update'
git push origin HEAD:feature/support-mail-20260921
fi
- uses: actions/upload-artifact@v4
if: always()
with:
name: support-form-test-results
path: test-results/
retention-days: 3
published:
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main'
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
with:
ref: production
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: node tests/production-support-form.mjs
- uses: actions/upload-artifact@v4
if: always()
with:
name: published-support-form
path: production-ui-results/
retention-days: 7