File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 shell : powershell
4141 run : |
4242 Start-Process -FilePath "./target/debug/examples/server" -RedirectStandardOutput "server.log" -RedirectStandardError "server-error.log" -NoNewWindow
43- Start-Sleep -Seconds 10 # Give server time to start
43+ Start-Sleep -Seconds 5 # Give server time to start
44+
45+ - name : Wait for server to start
46+ shell : powershell
47+ run : |
48+ $timeout = 30
49+ $elapsed = 0
50+ do {
51+ $result = Test-NetConnection -ComputerName localhost -Port 5432 -InformationLevel Quiet
52+ if ($result) {
53+ Write-Host "Port 5432 is open!"
54+ break
55+ }
56+ Start-Sleep -Seconds 1
57+ $elapsed++
58+ Write-Host "Waiting for port 5432... ($elapsed/$timeout)"
59+ } while ($elapsed -lt $timeout)
60+
61+ if (-not $result) {
62+ Write-Host "Port 5432 did not open within $timeout seconds"
63+ exit 1
64+ }
4465
4566 - name : test sqlx
4667 run : cargo run --example sqlx
You can’t perform that action at this time.
0 commit comments