Skip to content

Commit 6286f7c

Browse files
committed
CI: BATS: Opt-in to experimental WSL settings
This makes it possible for manually-triggered BATS runs to opt into some WSL experimental settings. Note that not all settings make sense together (some are just outright ignored in the current combination). Signed-off-by: Mark Yen <[email protected]>
1 parent d91cffd commit 6286f7c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/bats.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ on:
3535
description: Package run ID override; leave empty to use latest.
3636
default: ''
3737
type: string
38+
experimental:
39+
description: Run with experimental settings (WSL)
40+
default: false
41+
type: boolean
3842
schedule:
3943
- cron: '0 8 * * 1-5' # 8AM UTC weekdays as a baseline
4044

@@ -173,6 +177,26 @@ jobs:
173177
wsl.exe -d Debian --exec /usr/bin/env DEBIAN_FRONTEND=noninteractive
174178
sh -c 'apt-get update && apt-get install --yes bsdextrautils coreutils curl'
175179
180+
- name: "Windows: Enable experimental WSL settings"
181+
if: runner.os == 'Windows' && inputs.experimental
182+
shell: pwsh
183+
run: |
184+
Set-Content -Encoding UTF8NoBOM -Path "${HOME}/.wslconfig" -Value @"
185+
; Note that not all settings here make sense together.
186+
[wsl]
187+
dnsProxy=false
188+
; networkingMode=mirrored ; https://github.com/rancher-sandbox/rancher-desktop/issues/6665
189+
firewall=true
190+
dnsTunneling=true
191+
autoProxy=true
192+
[experimental]
193+
autoMemoryReclaim=gradual
194+
sparseVhd=true
195+
useWindowsDnsCache=true
196+
bestEffortDnsParsing=true
197+
hostAddressLoopback=true
198+
"
199+
176200
- name: Set log directory
177201
shell: bash
178202
run: |

0 commit comments

Comments
 (0)