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