Gate gateway task/replay scenario retries in demo policy and release … #207
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Demo E2E | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| jobs: | |
| demo-e2e: | |
| runs-on: windows-latest | |
| timeout-minutes: 45 | |
| permissions: | |
| contents: write | |
| env: | |
| FIRESTORE_ENABLED: "false" | |
| UI_NAVIGATOR_EXECUTOR_MODE: remote_http | |
| UI_NAVIGATOR_EXECUTOR_URL: http://localhost:8090 | |
| UI_EXECUTOR_STRICT_PLAYWRIGHT: "false" | |
| UI_EXECUTOR_SIMULATE_IF_UNAVAILABLE: "true" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install Dependencies | |
| run: npm ci | |
| shell: powershell | |
| - name: Run Unit Tests | |
| run: npm run test:unit | |
| shell: powershell | |
| - name: Run Runtime Profile Smoke | |
| run: npm run profile:smoke | |
| shell: powershell | |
| - name: Build Workspaces | |
| run: npm run build | |
| shell: powershell | |
| - name: Validate Monitoring Templates | |
| run: npm run infra:monitoring:validate | |
| shell: powershell | |
| - name: Run Demo E2E | |
| run: npm run demo:e2e:fast -- -RequestTimeoutSec 45 | |
| shell: powershell | |
| - name: Validate Demo KPI Policy | |
| run: > | |
| node ./scripts/demo-e2e-policy-check.mjs | |
| --input ./artifacts/demo-e2e/summary.json | |
| --output ./artifacts/demo-e2e/policy-check.md | |
| --jsonOutput ./artifacts/demo-e2e/policy-check.json | |
| --maxGatewayWsRoundTripMs 1800 | |
| --minApprovalsRecorded 1 | |
| --expectedUiAdapterMode remote_http | |
| --allowedUiAdapterModes remote_http,simulated | |
| --allowedGatewayInterruptEvents live.interrupt.requested,live.bridge.unavailable | |
| --allowedTranslationProviders fallback,gemini | |
| shell: powershell | |
| - name: Build Badge Artifact | |
| run: npm run demo:e2e:badge | |
| shell: powershell | |
| - name: Run Perf Load Policy Gate | |
| run: npm run perf:load:fast -- -LiveIterations 6 -LiveConcurrency 2 -UiIterations 6 -UiConcurrency 2 | |
| shell: powershell | |
| - name: Prepare Badge Publish Directory | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') | |
| shell: powershell | |
| run: | | |
| New-Item -Path "artifacts/demo-e2e/public" -ItemType Directory -Force | Out-Null | |
| Copy-Item "artifacts/demo-e2e/badge.json" "artifacts/demo-e2e/public/badge.json" -Force | |
| if (Test-Path "artifacts/demo-e2e/badge-details.json") { | |
| Copy-Item "artifacts/demo-e2e/badge-details.json" "artifacts/demo-e2e/public/badge-details.json" -Force | |
| } | |
| - name: Publish Badge To gh-pages | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: artifacts/demo-e2e/public | |
| destination_dir: demo-e2e | |
| keep_files: true | |
| force_orphan: false | |
| - name: Publish Demo Report To Job Summary | |
| if: always() | |
| shell: powershell | |
| run: | | |
| if (Test-Path "artifacts/demo-e2e/summary.md") { | |
| Get-Content "artifacts/demo-e2e/summary.md" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| } else { | |
| "Demo report was not generated." | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| } | |
| if (Test-Path "artifacts/demo-e2e/policy-check.md") { | |
| "" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| Get-Content "artifacts/demo-e2e/policy-check.md" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| } | |
| if (Test-Path "artifacts/demo-e2e/policy-check.json") { | |
| $policy = Get-Content "artifacts/demo-e2e/policy-check.json" -Raw | ConvertFrom-Json | |
| "" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| ("Policy gate status: " + ($(if ($policy.ok) { "passed" } else { "failed" }))) | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| ("Policy checks: " + $policy.checks + ", violations: " + $policy.violations.Count) | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| } | |
| if (Test-Path "artifacts/demo-e2e/badge.json") { | |
| $badge = Get-Content "artifacts/demo-e2e/badge.json" -Raw | ConvertFrom-Json | |
| ("Badge: " + $badge.label + " -> " + $badge.message + " (" + $badge.color + ")") | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| } | |
| if (Test-Path "artifacts/perf-load/policy-check.json") { | |
| $perf = Get-Content "artifacts/perf-load/policy-check.json" -Raw | ConvertFrom-Json | |
| ("Perf policy gate: " + ($(if ($perf.ok) { "passed" } else { "failed" })) + " (" + $perf.checks + " checks)") | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| } | |
| if ((Test-Path "artifacts/demo-e2e/badge.json") -and (("${{ github.event_name }}" -eq "push") -and (("${{ github.ref }}" -eq "refs/heads/main") -or ("${{ github.ref }}" -eq "refs/heads/master")))) { | |
| $repoParts = "${{ github.repository }}".Split("/") | |
| $owner = $repoParts[0] | |
| $repo = $repoParts[1] | |
| $badgeEndpoint = "https://$owner.github.io/$repo/demo-e2e/badge.json" | |
| $badgeShield = "https://img.shields.io/endpoint?url=$([System.Uri]::EscapeDataString($badgeEndpoint))" | |
| "" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| ("Badge endpoint: " + $badgeEndpoint) | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| ("Shields URL: " + $badgeShield) | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append | |
| } | |
| - name: Upload Demo Artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: demo-e2e-artifacts | |
| path: | | |
| artifacts/demo-e2e/summary.json | |
| artifacts/demo-e2e/summary.md | |
| artifacts/demo-e2e/policy-check.md | |
| artifacts/demo-e2e/policy-check.json | |
| artifacts/demo-e2e/badge.json | |
| artifacts/demo-e2e/badge-details.json | |
| artifacts/demo-e2e/logs | |
| artifacts/perf-load/summary.json | |
| artifacts/perf-load/summary.md | |
| artifacts/perf-load/policy-check.json | |
| artifacts/perf-load/policy-check.md | |
| artifacts/perf-load/logs | |
| if-no-files-found: warn |