Skip to content

Commit ecf82b7

Browse files
JeffreyDallasclaude
andcommitted
ci: add Windows runner support to zxc-e2e-test workflow
- Replace helm/kind-action (installs Linux binary on Windows) with a chocolatey-based Setup Kind (Windows) step for Windows runners - Guard Create Diagnostic Script and Setup E2E Tests steps with runner.os != 'Windows' (both rely on sudo/Linux shell scripts) - Add Run E2E Tests (Windows) step using pwsh without Linux process-group management (setsid/ionice/ps -o pgid=) - Guard Generate ASCII Resource Chart with runner.os != 'Windows' (calls a Linux shell script) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a48e4dc commit ecf82b7

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/zxc-e2e-test.yaml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ jobs:
291291
id: install
292292

293293
- name: Setup Kind
294-
if: ${{ inputs.install-dependencies == true && inputs.kind-install == true && !cancelled() && !failure() }}
294+
# helm/kind-action installs the Linux binary even on Windows runners, causing an Exec format error.
295+
# Use this action only on non-Windows runners; Windows uses chocolatey below.
296+
if: ${{ inputs.install-dependencies == true && inputs.kind-install == true && runner.os != 'Windows' && !cancelled() && !failure() }}
295297
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
296298
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
297299
with:
@@ -302,6 +304,13 @@ jobs:
302304
verbosity: 3
303305
wait: 120s
304306

307+
- name: Setup Kind (Windows)
308+
# helm/kind-action does not support Windows runners; install the native Windows binary via chocolatey.
309+
if: ${{ inputs.install-dependencies == true && inputs.kind-install == true && runner.os == 'Windows' && !cancelled() && !failure() }}
310+
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
311+
shell: pwsh
312+
run: choco install kind --version '${{ inputs.kind-version }}' -y
313+
305314
- name: Setup Helm
306315
if: ${{ inputs.install-dependencies == true && inputs.helm-install == true && !cancelled() && !failure() }}
307316
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
@@ -356,7 +365,7 @@ jobs:
356365
cache-read-only: false
357366

358367
- name: Create Diagnostic Script
359-
if: ${{ !cancelled() && !failure() }}
368+
if: ${{ runner.os != 'Windows' && !cancelled() && !failure() }}
360369
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
361370
env:
362371
WRITE_DIAG_SCRIPT: ${{ github.workspace }}/.github/workflows/script/write_diag_script.sh
@@ -384,7 +393,7 @@ jobs:
384393
cd ../solo
385394
386395
- name: Setup E2E Tests
387-
if: ${{ inputs.custom-job-label != 'One Shot Single - using Podman' && !cancelled() && !failure() }}
396+
if: ${{ inputs.custom-job-label != 'One Shot Single - using Podman' && runner.os != 'Windows' && !cancelled() && !failure() }}
388397
uses: step-security/retry@e1d59ce1f574b32f0915e3a8df055cfe9f99be5d # v3.0.4
389398
with:
390399
max_attempts: 3
@@ -518,6 +527,21 @@ jobs:
518527
519528
exit $TEST_EXIT_CODE
520529
530+
- name: Run E2E Tests (Windows)
531+
id: run-e2e-tests-windows
532+
# The Linux Run E2E Tests step uses setsid/ps/ionice which are not available on Windows.
533+
# This step runs the same test task on Windows using pwsh without process-group management.
534+
if: ${{ inputs.runner == 'windows-latest' && !cancelled() && !failure() }}
535+
timeout-minutes: ${{ fromJSON(inputs.test-timeout-minutes) }}
536+
shell: pwsh
537+
run: |
538+
$env:PATH = "$env:USERPROFILE\.solo\bin;$env:PATH"
539+
if ("${{ inputs.consensus-node-version }}" -ne "") {
540+
$env:CONSENSUS_NODE_VERSION = "${{ inputs.consensus-node-version }}"
541+
}
542+
"SOLO_TEST_CLUSTER=${{ inputs.cluster-name }}-c1" | Out-File -FilePath .env -Encoding utf8
543+
task ${{ inputs.test-script }}
544+
521545
- name: Log Metrics
522546
id: log-metrics
523547
if: ${{ !cancelled() }}
@@ -556,6 +580,7 @@ jobs:
556580
557581
- name: Generate ASCII Resource Chart
558582
id: generate-chart
583+
if: ${{ runner.os != 'Windows' }}
559584
timeout-minutes: ${{ fromJSON(env.STEP_TIMEOUT_MINUTES) }}
560585
run: |
561586
echo "json_log=${{ steps.log-metrics.outputs.json_log }}"

0 commit comments

Comments
 (0)