Add Windows runner to CLI e2e tests and improve cross-platform compatibility#217
Add Windows runner to CLI e2e tests and improve cross-platform compatibility#217
Conversation
Run cli-e2e-tests on both the default Linux runner and depot-windows-2025-4 in parallel using a matrix strategy. Adds shell:bash for cross-platform compatibility, skips chmod on Windows, and uses npx nx for portable paths. Co-Authored-By: Claude <noreply@anthropic.com> https://claude.ai/code/session_01PG3L6cAwuUMJ2A5ibPYBdy
Greptile SummaryThis PR modifies the Key changes and concerns:
Confidence Score: 1/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[build-cli matrix] --> B{matrix.runner}
B --> C[self-hosted runner]
B --> D[depot-windows-2025-4]
C --> E[npm ci]
C --> F[Set up Bun ✅]
C --> G[Get package version ✅]
C --> H["Build CLI\n./node_modules/.bin/nx ⚠️"]
C --> I["Test CLI\n./node_modules/.bin/nx ⚠️"]
C --> J[Upload artifacts ✅]
C --> K[Build executables ✅]
G -->|sets version output| OUT
D --> E2[npm ci]
D --> F2["Set up Bun — SKIPPED"]
D --> G2["Get package version — SKIPPED\nversion output = empty ⚠️"]
D --> H2["Build CLI\n./node_modules/.bin/nx → FAILS ❌"]
D --> I2["Test CLI\n./node_modules/.bin/nx → FAILS ❌"]
D --> J2["Upload artifacts — SKIPPED"]
G2 -->|empty string| OUT
OUT["Job output: version\nNon-deterministic — last-finishing runner wins ⚠️"]
OUT --> DOWN["Downstream: cli-version\ncli-executables-artifact\nconsumed by callers ⚠️"]
style H fill:#ffa500,color:#000
style I fill:#ffa500,color:#000
style H2 fill:#ff4444,color:#fff
style I2 fill:#ff4444,color:#fff
style G2 fill:#ffa500,color:#000
style OUT fill:#ffa500,color:#000
style DOWN fill:#ffa500,color:#000
|
…2E tests - Add step to switch Docker to Linux container mode via DockerCli.exe -SwitchLinuxEngine before running docker compose on Windows - Wait for Docker daemon readiness with retry loop (up to 30 attempts) - Increase cli-e2e-tests job timeout from 45 to 60 minutes Co-Authored-By: Claude <noreply@anthropic.com> https://claude.ai/code/session_01PG3L6cAwuUMJ2A5ibPYBdy
Remove Docker-based cli-e2e-tests job and instead add a Windows runner to the build-cli matrix. This builds and tests the CLI on both Linux and Windows without the complexity of Docker-in-Docker on Windows. Linux-only steps (Bun executables, artifact uploads) are gated with runner.os != 'Windows' conditionals. Co-Authored-By: Claude <noreply@anthropic.com> https://claude.ai/code/session_01PG3L6cAwuUMJ2A5ibPYBdy
Explanation
This PR enhances the CLI e2e test workflow to run on multiple runner types and improves cross-platform compatibility:
cli-e2e-testsjob to use a matrix strategy that runs tests on both the self-hosted runner and a Windows runner (depot-windows-2025-4)./node_modules/.bin/nxcalls withnpx nxfor better cross-platform compatibilityshell: bashto steps that require bash (Docker operations, service checks)Type of Change
Affected Components
Testing
TODO List
Reviewer Notes
The key changes ensure the CLI e2e tests can run successfully on Windows runners by:
npxinstead of direct node_modules paths (more portable)This enables better test coverage across different operating systems without breaking existing self-hosted runner functionality.
https://claude.ai/code/session_01PG3L6cAwuUMJ2A5ibPYBdy