name: E2E IFT smoke (admin) # После успешного Deploy IFT — smoke против живого IFT (без API-моков). # Secrets (repo EventHubFrontAdmin): E2E_ADMIN_EMAIL, E2E_ADMIN_PASSWORD; # опционально E2E_IFT_BASE_URL (default https://admin-ui.ift.eventhub.local). on: workflow_run: workflows: ["Deploy IFT (admin)"] types: [completed] workflow_dispatch: concurrency: group: eventhub-frontadmin-e2e-ift cancel-in-progress: false jobs: ift-smoke: if: | github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') runs-on: ubuntu-latest timeout-minutes: 20 steps: - uses: actions/checkout@v4 with: ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }} - uses: actions/setup-node@v4 with: node-version: '22' - run: npm ci - name: Install Playwright browser run: npx playwright install --with-deps chromium - name: IFT smoke env: E2E_TARGET: ift E2E_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL }} E2E_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD }} E2E_IFT_BASE_URL: ${{ secrets.E2E_IFT_BASE_URL }} run: | set -euo pipefail if [ -z "${E2E_ADMIN_EMAIL:-}" ] || [ -z "${E2E_ADMIN_PASSWORD:-}" ]; then echo "::error::Нужны secrets E2E_ADMIN_EMAIL и E2E_ADMIN_PASSWORD" exit 1 fi npm run test:e2e:ift - name: Upload Playwright report if: failure() uses: actions/upload-artifact@v3 with: name: playwright-ift-report path: playwright-report/ retention-days: 7