From 5e55f13e8723f7eeadb3055c6508c32a6ac6ac3e Mon Sep 17 00:00:00 2001 From: snomiao Date: Sun, 7 Sep 2025 01:48:35 +0000 Subject: [PATCH] Fix: Move chromium deployment info generation to merge-reports job The sharded chromium tests were generating deployment info only from shard 1, which could miss failures from other shards. This change moves the deployment info generation to the merge-reports job where we have visibility into the overall result of all shards. Fixes #5338 --- .github/workflows/test-ui.yaml | 43 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test-ui.yaml b/.github/workflows/test-ui.yaml index e87dbd057..03fc1e2d8 100644 --- a/.github/workflows/test-ui.yaml +++ b/.github/workflows/test-ui.yaml @@ -162,27 +162,6 @@ jobs: path: blob-report/ retention-days: 1 - # Save test result for deployment info (only on shard 1 to avoid duplicates) - - name: Save test result for chromium - if: always() && matrix.shardIndex == 1 - run: | - # Use outcome to determine exit code (0 for success, 1 for failure/skipped) - if [ "${{ steps.playwright.outcome }}" = "success" ]; then - EXIT_CODE=0 - else - EXIT_CODE=1 - fi - # For sharded tests, we use the main chromium project name - echo "chromium|${EXIT_CODE}|https://comfyui-playwright-chromium.pages.dev" > deployment-info-chromium.txt - working-directory: ComfyUI_frontend - - - uses: actions/upload-artifact@v4 - if: always() && matrix.shardIndex == 1 - with: - name: deployment-info-chromium - path: ComfyUI_frontend/deployment-info-chromium.txt - retention-days: 1 - playwright-tests: # Ideally, each shard runs test in 6 minutes, but allow up to 15 minutes timeout-minutes: 15 @@ -331,3 +310,25 @@ jobs: name: playwright-report-chromium path: ComfyUI_frontend/playwright-report/ retention-days: 30 + + - name: Save deployment info for merged chromium report + if: always() + run: | + # Determine exit code based on the needs context + # The merge-reports job only runs if sharded tests complete (success, failure, or cancelled) + # We consider it successful only if all sharded tests succeeded + if [ "${{ needs.playwright-tests-chromium-sharded.result }}" = "success" ]; then + EXIT_CODE=0 + else + EXIT_CODE=1 + fi + + echo "chromium|${EXIT_CODE}|https://comfyui-playwright-chromium.pages.dev" > deployment-info-chromium.txt + working-directory: ComfyUI_frontend + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: deployment-info-chromium + path: ComfyUI_frontend/deployment-info-chromium.txt + retention-days: 1