@@ -87,16 +87,16 @@ jobs:
8787 exit 1
8888 fi
8989
90- # Run the .NET Framework (net48) end to end tests on Windows. There is no
91- # Linux Kubernetes distribution that runs natively on a Windows runner, so the
92- # kindest/node image (which already bundles containerd, the kubelet and the
93- # control-plane components) is imported straight into WSL with oci-to-wsl.
90+ # Run the same end to end suite as the Linux `e2e` job, but on Windows. There
91+ # is no Linux Kubernetes distribution that runs natively on a Windows runner,
92+ # so the kindest/node image (which already bundles containerd, the kubelet and
93+ # the control-plane components) is imported straight into WSL with oci-to-wsl.
9494 # WSL2 is enabled by default on the runner, so no separate WSL provisioning is
9595 # needed, and the API server is reachable from the Windows host (which runs the
96- # net48 test process) through WSL2 localhost forwarding.
97- e2e-windows-net48 :
96+ # test process) through WSL2 localhost forwarding.
97+ e2e-windows-wsl :
9898 runs-on : windows-latest
99- name : E2E net48 (kind in WSL)
99+ name : E2E (kind in WSL)
100100 steps :
101101 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
102102 with :
@@ -106,6 +106,7 @@ jobs:
106106 with :
107107 dotnet-version : |
108108 8.0.x
109+ 9.0.x
109110 10.0.x
110111 - name : Install oci-to-wsl
111112 shell : pwsh
@@ -125,22 +126,58 @@ jobs:
125126 .\oci-to-wsl.exe --profile .github/e2e/kind-wsl.yaml
126127
127128 # Reboot the distro so the systemd configuration written by the profile
128- # takes effect, then bring up the single node control plane in place .
129+ # takes effect.
129130 wsl --shutdown
131+
132+ # WSL terminates the lightweight VM once its last session exits, which
133+ # tears down the API server between steps and makes localhost:6443
134+ # connections fail with "actively refused". Hold an idle session open in
135+ # the background so the cluster (and WSL2 localhost forwarding) stay up
136+ # for the duration of the host-side test steps.
137+ Start-Process -FilePath wsl -ArgumentList '-d','kind','-u','root','--','sleep','infinity'
138+
139+ # Bring up the single node control plane in place.
130140 wsl -d kind -u root -- bash /usr/local/bin/bootstrap-kind.sh
131141
132142 # Export a kubeconfig for the Windows host. kubeadm points it at the WSL
133143 # eth0 address; rewrite it to localhost, which WSL2 forwards into WSL.
134144 wsl -d kind -u root -- cat /etc/kubernetes/admin.conf | Out-File -Encoding ascii kind.kubeconfig
135145 (Get-Content kind.kubeconfig) -replace 'server: https://[^ ]+', 'server: https://127.0.0.1:6443' | Set-Content kind.kubeconfig
136- - name : E2E net48 Test
146+
147+ # Wait until the API server is reachable from the Windows host through
148+ # the forwarded port before handing off to the test steps.
149+ $ok = $false
150+ foreach ($i in 1..60) {
151+ if ((Test-NetConnection -ComputerName 127.0.0.1 -Port 6443 -WarningAction SilentlyContinue).TcpTestSucceeded) {
152+ $ok = $true
153+ break
154+ }
155+ Start-Sleep -Seconds 5
156+ }
157+ if (-not $ok) {
158+ throw "API server on 127.0.0.1:6443 was not reachable from the Windows host"
159+ }
160+ - name : Test
161+ shell : pwsh
162+ env :
163+ K8S_E2E_MINIKUBE : " 1"
164+ KUBECONFIG : ${{ github.workspace }}\kind.kubeconfig
165+ run : |
166+ "" | Out-File -Encoding ascii skip.log
167+ dotnet test tests/E2E.Tests --logger "SkipTestLogger;file=$PWD/skip.log" -p:BuildInParallel=false
168+ if ((Get-Item skip.log).Length -gt 0) {
169+ Get-Content skip.log
170+ Write-Error "CASES MUST NOT BE SKIPPED"
171+ exit 1
172+ }
173+ - name : AOT Test
137174 shell : pwsh
138175 env :
139176 K8S_E2E_MINIKUBE : " 1"
140177 KUBECONFIG : ${{ github.workspace }}\kind.kubeconfig
141178 run : |
142179 "" | Out-File -Encoding ascii skip.log
143- dotnet test tests/E2E.Classic .Tests -f net48 --logger "SkipTestLogger;file=$PWD/skip.log" -p:BuildInParallel=false
180+ dotnet test tests/E2E.Aot .Tests --logger "SkipTestLogger;file=$PWD/skip.log" -p:BuildInParallel=false
144181 if ((Get-Item skip.log).Length -gt 0) {
145182 Get-Content skip.log
146183 Write-Error "CASES MUST NOT BE SKIPPED"
0 commit comments