Skip to content

feat(ci): Add Windows runner for Playwright E2E tests#7769

Closed
SBALAVIGNESH123 wants to merge 3 commits intoComfy-Org:mainfrom
SBALAVIGNESH123:feat/windows-ci
Closed

feat(ci): Add Windows runner for Playwright E2E tests#7769
SBALAVIGNESH123 wants to merge 3 commits intoComfy-Org:mainfrom
SBALAVIGNESH123:feat/windows-ci

Conversation

@SBALAVIGNESH123
Copy link

@SBALAVIGNESH123 SBALAVIGNESH123 commented Dec 27, 2025

This PR adds a Windows runner job to the E2E test workflow to ensure cross-platform compatibility for browser tests.

Fixes #3197

Changes:

  • Added \playwright-tests-windows\ job to .github/workflows/ci-tests-e2e.yaml\
  • Uses \windows-latest\ runner
  • Reuses existing setup actions with \shell: bash\ for compatibility

┆Issue is synchronized with this Notion page by Unito

@SBALAVIGNESH123 SBALAVIGNESH123 requested a review from a team as a code owner December 27, 2025 07:11
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 27, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 27, 2025

📝 Walkthrough

Walkthrough

Adds a new GitHub Actions job playwright-tests-windows that runs Chromium Playwright tests on windows-latest, updates merge-reports and deploy-and-comment job dependencies to include the Windows job, and adapts blob report collection patterns to include Windows artifacts.

Changes

Cohort / File(s) Summary
CI Workflow — Windows Playwright job
.github/workflows/ci-tests-e2e.yaml
Adds playwright-tests-windows job (runs-on: windows-latest, timeout 20m, matrix.shard 1..8). Steps: checkout, start ComfyUI server, setup Node.js/pnpm and build frontend (no cache restore), setup Playwright, run Chromium Playwright tests with blob reporter per shard, upload blob artifacts named blob-report-windows-<shard>. Uses bash for run/generate steps.
CI Workflow — Report merging/collection
.github/workflows/ci-tests-e2e.yaml
Updates blob report patterns from blob-report-chromium-* to blob-report-* in download/merge steps to include Windows artifacts; merge step needs now includes both sharded Chromium and Windows jobs.
CI Workflow — Job dependency updates
.github/workflows/ci-tests-e2e.yaml
Updates merge-reports job needs to include playwright-tests-windows (was playwright-tests-chromium-sharded only) and updates deploy-and-comment needs to [playwright-tests, merge-reports, playwright-tests-windows].

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant GH as GitHub Actions (windows-latest)
    participant Repo as Repository (actions/checkout)
    participant Server as ComfyUI Server
    participant Node as Node.js / pnpm / Frontend Build
    participant Playwright as Playwright Runner (Chromium)
    participant Reports as Report Merger/Generator
    participant Artifacts as Artifact Storage

    Note over GH: Start job `playwright-tests-windows` (matrix shard)
    GH->>Repo: checkout repository
    GH->>Server: start ComfyUI server (launch_server: true)
    GH->>Node: setup Node.js & pnpm, build frontend (no cache)
    GH->>Playwright: install/setup Playwright
    Playwright->>Server: run Chromium tests (shard)
    Playwright->>Artifacts: write blob report `blob-report-windows-<shard>`
    Artifacts->>Reports: download all `blob-report-*`
    Reports->>Reports: merge JSON blobs → generate HTML/JSON reports
    Reports->>Artifacts: upload merged report artifacts
    Note over GH,Artifacts: Job matrix shards complete
Loading

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR successfully implements all objectives from issue #3197: adds Windows runner for Playwright E2E tests, reuses existing workflow setup, runs Chromium tests on windows-latest, and increases cross-platform coverage.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #3197. The PR adds Windows test infrastructure, updates job dependencies, and modifies artifact patterns—all within the stated objective of enabling Windows browser testing.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 27, 2025

🎨 Storybook Build Status

loading Build is starting...

⏰ Started at: 12/28/2025, 07:58:40 AM UTC

🚀 Building Storybook

  • 📦 Installing dependencies...
  • 🔧 Building Storybook components...
  • 🌐 Preparing deployment to Cloudflare Pages...

⏱️ Please wait while the Storybook build is in progress...

@github-actions
Copy link

github-actions bot commented Dec 27, 2025

🎭 Playwright Test Results

loading Tests are starting...

⏰ Started at: 12/28/2025, 07:58:40 AM UTC

🚀 Running Tests

  • 🧪 chromium: Running tests...
  • 🧪 chromium-0.5x: Running tests...
  • 🧪 chromium-2x: Running tests...
  • 🧪 mobile-chrome: Running tests...

⏱️ Please wait while tests are running...

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci-tests-e2e.yaml (1)

266-267: Windows test results won't block PR deployment.

The deploy-and-comment job's needs array doesn't include playwright-tests-windows, meaning deployment will proceed even if Windows tests fail or are still running. This undermines the value of adding Windows CI coverage.

🔎 Proposed fix: Add Windows job to deployment dependencies
  deploy-and-comment:
-   needs: [playwright-tests, merge-reports]
+   needs: [playwright-tests, merge-reports, playwright-tests-windows]
    runs-on: ubuntu-latest
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59af159 and 5161400.

📒 Files selected for processing (1)
  • .github/workflows/ci-tests-e2e.yaml
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to browser_tests/**/*.spec.ts : Use E2E tests in `browser_tests/**/*.spec.ts` with Playwright framework
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Use Playwright fixtures for browser tests
Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Tests should be cross-platform compatible using `path.resolve`, `path.join`, and `path.sep` for Windows, macOS, and Linux compatibility
📚 Learning: 2025-12-12T23:02:37.473Z
Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.

Applied to files:

  • .github/workflows/ci-tests-e2e.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to browser_tests/**/*.spec.ts : Use E2E tests in `browser_tests/**/*.spec.ts` with Playwright framework

Applied to files:

  • .github/workflows/ci-tests-e2e.yaml
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Use Playwright fixtures for browser tests

Applied to files:

  • .github/workflows/ci-tests-e2e.yaml
🔇 Additional comments (3)
.github/workflows/ci-tests-e2e.yaml (3)

167-174: Verify composite actions are Windows-compatible.

The composite actions used here (./.github/actions/setup-comfyui-server, setup-frontend, setup-playwright) must support Windows runners. Verify they:

  • Use cross-platform commands or include Windows-specific steps
  • Handle Windows path separators correctly
  • Support Windows-specific Python/Node.js installation if needed
  • Can launch the ComfyUI server on Windows

The verification script in the previous comment will display the action definitions to confirm Windows compatibility.


157-159: Good practice: Using bash shell on Windows for consistency.

Explicitly specifying shell: bash ensures cross-platform compatibility of the commands and is supported by the windows-latest runner, which includes Git Bash.


191-197: Good artifact naming prevents conflicts.

The artifact name playwright-report-windows-chromium is distinct from the merged Linux chromium report (playwright-report-chromium at line 232) and will be correctly matched by the download pattern playwright-report-* at line 280.

@SBALAVIGNESH123
Copy link
Author

Ready for CI approval! I've implemented the Windows inputs as requested. Let me know if you need any other tweaks.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
.github/workflows/ci-tests-e2e.yaml (1)

164-173: Composite actions have critical Windows compatibility issues.

The three composite actions have Unix-specific commands that will fail on Windows runners:

  • setup-comfyui-server: Uses cp -r command (not available on Windows cmd/PowerShell) and wait-for-it utility (Unix-specific shell script)
  • setup-playwright: Uses jq for JSON parsing (unavailable on Windows) and Unix-style cache path ~/.cache/ms-playwright

All actions explicitly specify shell: bash, which may not be available on default Windows runners. Replace Unix-only commands with cross-platform alternatives:

  • Replace cp -r with Node.js-based copy or use @actions/core utilities
  • Replace wait-for-it with cross-platform polling (Node.js or Python)
  • Replace jq with node -e or built-in JSON parsing

Alternatively, add explicit Windows conditionals or ensure bash is available system-wide on Windows runners.

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c09a3a and 17611f2.

📒 Files selected for processing (1)
  • .github/workflows/ci-tests-e2e.yaml
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to browser_tests/**/*.spec.ts : Use E2E tests in `browser_tests/**/*.spec.ts` with Playwright framework
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Use Playwright fixtures for browser tests
Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.
📚 Learning: 2025-12-12T23:02:37.473Z
Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.

Applied to files:

  • .github/workflows/ci-tests-e2e.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to browser_tests/**/*.spec.ts : Use E2E tests in `browser_tests/**/*.spec.ts` with Playwright framework

Applied to files:

  • .github/workflows/ci-tests-e2e.yaml
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Use Playwright fixtures for browser tests

Applied to files:

  • .github/workflows/ci-tests-e2e.yaml
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Tests should be cross-platform compatible using `path.resolve`, `path.join`, and `path.sep` for Windows, macOS, and Linux compatibility

Applied to files:

  • .github/workflows/ci-tests-e2e.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to browser_tests/**/*.spec.ts : Use tags like `mobile` and `2x` in Playwright tests for relevant test variations; tags are respected by config

Applied to files:

  • .github/workflows/ci-tests-e2e.yaml
🔇 Additional comments (4)
.github/workflows/ci-tests-e2e.yaml (4)

150-191: LGTM! Past feedback correctly addressed.

The Windows job implementation properly addresses all previous concerns:

  • No cross-platform cache restoration (removed needs: setup dependency)
  • Explicit Windows build (include_build_step: true)
  • 8-way sharding implemented to prevent timeouts
  • Unique artifact naming per shard

The 20-minute timeout is reasonable with sharding in place.


178-178: Verify that testing only chromium project on Windows is intentional.

The Windows job runs only --project=chromium, while the playwright-tests job (lines 92-148) also tests chromium-2x, chromium-0.5x, and mobile-chrome projects on Linux. This appears aligned with issue #3197 ("Run the Chromium Playwright project on the Windows runner"), but please confirm that omitting the other browser/scaling variants from Windows testing is intentional.


194-194: LGTM! Merge dependencies and pattern correctly updated.

The merge-reports job now:

  • Waits for Windows tests to complete (line 194)
  • Collects both Linux and Windows blob reports via the updated blob-report-* pattern (line 211)

This ensures Windows test results are included in the merged HTML report.

Also applies to: 211-211


260-260: LGTM! Deployment now waits for Windows tests.

The deploy-and-comment job correctly includes playwright-tests-windows in its dependencies, ensuring Windows test failures block deployment. This addresses the previous feedback and aligns with the cross-platform validation objectives from issue #3197.

strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider renaming for consistency.

The Linux chromium job uses matrix.shardIndex (line 54), while this Windows job uses matrix.shard. For maintainability, consider using shardIndex here as well.

🔎 Proposed change for consistency
       matrix:
-        shard: [1, 2, 3, 4, 5, 6, 7, 8]
+        shardIndex: [1, 2, 3, 4, 5, 6, 7, 8]

Then update references on lines 178 and 188:

-          pnpm exec playwright test --project=chromium --reporter=blob --shard=${{ matrix.shard }}/8
+          pnpm exec playwright test --project=chromium --reporter=blob --shard=${{ matrix.shardIndex }}/8
-          name: blob-report-windows-${{ matrix.shard }}
+          name: blob-report-windows-${{ matrix.shardIndex }}

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
.github/workflows/ci-tests-e2e.yaml around line 159: the Windows job defines the
shard matrix key as "shard" while the Linux job uses "shardIndex", causing
inconsistency; rename the matrix key from "shard" to "shardIndex" and update any
references that use matrix.shard to matrix.shardIndex (notably at lines 178 and
188) so the variable name is consistent across jobs.

Comment on lines +184 to +185
uses: actions/upload-artifact@v4
if: always()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Align upload condition with Linux sharded job.

The Windows job uses if: always(), but the Linux chromium job uses if: ${{ !cancelled() }} (line 86). The !cancelled() condition is more appropriate as it uploads reports on success or failure but skips uploading if the workflow is cancelled, saving storage costs.

🔎 Proposed fix
       - name: Upload Blob Report
         uses: actions/upload-artifact@v4
-        if: always()
+        if: ${{ !cancelled() }}
         with:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/upload-artifact@v4
if: always()
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
🤖 Prompt for AI Agents
In .github/workflows/ci-tests-e2e.yaml around lines 184-185 the Windows job uses
"if: always()", which uploads artifacts even when the workflow is cancelled;
change the condition to "if: ${{ !cancelled() }}" to match the Linux chromium
job and ensure artifacts are uploaded on success or failure but skipped when the
workflow is cancelled.

@Myestery
Copy link
Contributor

Thanks for the contribution! After reviewing this, the decision is not to move forward with it at this time for a few reasons:

  1. Screenshot incompatibility - Windows would require disabling screenshot tests, as they won't match the existing Ubuntu-based snapshots
  2. Resource constraints - The Ubuntu tests already consume significant time and resources, so Windows tests would need to run on-demand only
  3. CI container direction - The test infrastructure has been consolidated around a Docker-based Ubuntu image. Supporting Windows would require additional CI container updates

This may be revisited in the future if the need arises. Thanks again for putting this together!

@Myestery Myestery closed this Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DevTask]: Run browser tests on Windows runner

2 participants