@@ -104,7 +104,7 @@ jobs:
104
104
with :
105
105
name : genkit-${{ matrix.target }}
106
106
path : genkit-tools/cli/dist/bin/genkit-${{ matrix.target }}${{ steps.binary.outputs.ext }}
107
- retention-days : 1
107
+ retention-days : 1 # TODO: Consider increasing to 7 days for better debugging capability
108
108
109
109
test :
110
110
needs : build
@@ -202,4 +202,58 @@ jobs:
202
202
fi
203
203
204
204
# Clean up any remaining processes
205
- pkill -f "genkit.*ui:start" 2>/dev/null || true
205
+ pkill -f "genkit.*ui:start" 2>/dev/null || true
206
+
207
+ - name : Test UI start functionality (Windows only)
208
+ if : runner.os == 'Windows'
209
+ shell : pwsh
210
+ run : |
211
+ Write-Host "Testing genkit ui:start"
212
+
213
+ # Create empty input file first for redirecting stdin
214
+ "" | Out-File -FilePath ".\empty.txt"
215
+
216
+ # Start UI in background, redirecting input to handle prompts
217
+ $process = Start-Process -FilePath ".\genkit-${{ matrix.target }}.exe" `
218
+ -ArgumentList "ui:start" `
219
+ -RedirectStandardInput ".\empty.txt" `
220
+ -RedirectStandardOutput ".\ui_output.log" `
221
+ -RedirectStandardError ".\ui_error.log" `
222
+ -PassThru `
223
+ -NoNewWindow
224
+
225
+ # Give it time to start
226
+ Start-Sleep -Seconds 5
227
+
228
+ # Read the output
229
+ $output = Get-Content ".\ui_output.log" -ErrorAction SilentlyContinue
230
+ $errorOutput = Get-Content ".\ui_error.log" -ErrorAction SilentlyContinue
231
+
232
+ if ($output -match "Genkit Developer UI started at:") {
233
+ Write-Host "✓ UI started successfully"
234
+ Write-Host "Output:"
235
+ $output | Write-Host
236
+
237
+ # Try to stop it gracefully
238
+ Write-Host "Testing genkit ui:stop"
239
+ & ".\genkit-${{ matrix.target }}.exe" ui:stop
240
+
241
+ Start-Sleep -Seconds 2
242
+ } else {
243
+ Write-Host "UI did not start as expected"
244
+ Write-Host "Output:"
245
+ $output | Write-Host
246
+ Write-Host "Error:"
247
+ $errorOutput | Write-Host
248
+
249
+ # Check if process is still running
250
+ if (-not $process.HasExited) {
251
+ Write-Host "Process is still running, terminating..."
252
+ Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue
253
+ } else {
254
+ Write-Host "Process exited (might be due to cookie prompt or missing project)"
255
+ }
256
+ }
257
+
258
+ # Clean up any remaining genkit processes
259
+ Get-Process | Where-Object { $_.ProcessName -match "genkit" } | Stop-Process -Force -ErrorAction SilentlyContinue
0 commit comments