81
81
aws-region : ${{ secrets.WINDOWS_REGION }}
82
82
- name : Remove Finch VM
83
83
timeout-minutes : 2
84
- run : |
85
- $ErrorActionPreference = 'Ignore'
86
- taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0"
87
- wsl --list --verbose
88
- sc query LxssManager | findstr "STATE" | findstr /C:"STOPPED" > nul && net start LxssManager
89
- wsl --shutdown
90
- wsl --unregister lima-finch
91
- wsl --list --verbose
84
+ shell : pwsh
85
+ run : ./scripts/cleanup_wsl.ps1
92
86
- name : Clean up previous files
93
87
run : |
94
88
takeown /F C:\actions-runner\_work\finch /R
@@ -148,16 +142,9 @@ jobs:
148
142
- name : Remove Finch VM and Clean Up Previous Environment
149
143
if : ${{ always() }}
150
144
timeout-minutes : 2
145
+ shell : pwsh
151
146
run : |
152
- # We want these cleanup commands to always run, ignore errors so the step completes.
153
- $ErrorActionPreference = 'Ignore'
154
- taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0"
155
- wsl --list --verbose
156
- sc query LxssManager | findstr "STATE" | findstr /C:"STOPPED" > nul && net start LxssManager
157
- wsl --shutdown
158
- wsl --unregister lima-finch
159
- wsl --list --verbose
160
- Remove-Item C:\Users\Administrator\AppData\Local\.finch -Recurse
147
+ ./scripts/cleanup_wsl.ps1
161
148
make clean
162
149
cd deps/finch-core && make clean
163
150
exit 0 # Cleanup may set the exit code e.g. if a file doesn't exist; just ignore
@@ -203,15 +190,8 @@ jobs:
203
190
aws-region : ${{ secrets.REGION }}
204
191
- name : Remove Finch VM
205
192
timeout-minutes : 2
206
- run : |
207
- # We want these cleanup commands to always run, ignore errors so the step completes.
208
- $ErrorActionPreference = 'Ignore'
209
- taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0"
210
- wsl --list --verbose
211
- sc query LxssManager | findstr "STATE" | findstr /C:"STOPPED" > nul && net start LxssManager
212
- wsl --shutdown
213
- wsl --unregister lima-finch
214
- wsl --list --verbose
193
+ shell : pwsh
194
+ run : ./scripts/cleanup_wsl.ps1
215
195
- name : Clean up previous files
216
196
run : |
217
197
Remove-Item C:\Users\Administrator\.finch -Recurse -ErrorAction Ignore
@@ -250,17 +230,8 @@ jobs:
250
230
make test-e2e-vm
251
231
- name : Remove Finch VM
252
232
timeout-minutes : 2
253
- run : |
254
- # We want these cleanup commands to always run, ignore errors so the step completes.
255
- $ErrorActionPreference = 'Ignore'
256
- taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0"
257
- wsl --list --verbose
258
- sc query LxssManager | findstr "STATE" | findstr /C:"STOPPED" > nul && net start LxssManager
259
- wsl --shutdown
260
- Start-Sleep -s 10
261
- wsl --unregister lima-finch
262
- Remove-Item C:\Users\Administrator\AppData\Local\.finch -Recurse
263
- wsl --list --verbose
233
+ shell : pwsh
234
+ run : ./scripts/cleanup_wsl.ps1
264
235
- name : Run container e2e tests
265
236
uses : nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
266
237
with :
@@ -287,16 +258,9 @@ jobs:
287
258
- name : Remove Finch VM and Clean Up Previous Environment
288
259
if : ${{ always() }}
289
260
timeout-minutes : 2
261
+ shell : pwsh
290
262
run : |
291
- # We want these cleanup commands to always run, ignore errors so the step completes.
292
- $ErrorActionPreference = 'Ignore'
293
- taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0"
294
- wsl --list --verbose
295
- sc query LxssManager | findstr "STATE" | findstr /C:"STOPPED" > nul && net start LxssManager
296
- wsl --shutdown
297
- wsl --unregister lima-finch
298
- wsl --list --verbose
299
- Remove-Item C:\Users\Administrator\AppData\Local\.finch -Recurse
263
+ ./scripts/cleanup_wsl.ps1
300
264
make clean
301
265
cd deps/finch-core && make clean
302
266
exit 0 # Cleanup may set the exit code e.g. if a file doesn't exist; just ignore
0 commit comments