File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,18 @@ jobs:
210210 RAILS_ENV=test rails server &
211211
212212 - name : Wait for Rails server to start
213- run : while ! curl -s http://localhost:3000 > /dev/null; do sleep 1; done
213+ run : |
214+ timeout=60
215+ elapsed=0
216+ while ! curl -s http://localhost:3000 > /dev/null; do
217+ sleep 1
218+ elapsed=$((elapsed + 1))
219+ if [ $elapsed -ge $timeout ]; then
220+ echo "Timeout waiting for Rails server to start after ${timeout}s"
221+ exit 1
222+ fi
223+ done
224+ echo "Rails server started after ${elapsed}s"
214225
215226 - name : Run RSpec tests for Pro dummy app
216227 run : |
@@ -384,7 +395,18 @@ jobs:
384395 RAILS_ENV=test rails server &
385396
386397 - name : Wait for Rails server to start
387- run : while ! curl -s http://localhost:3000 > /dev/null; do sleep 1; done
398+ run : |
399+ timeout=300
400+ elapsed=0
401+ while ! curl -s http://localhost:3000 > /dev/null; do
402+ sleep 1
403+ elapsed=$((elapsed + 1))
404+ if [ $elapsed -ge $timeout ]; then
405+ echo "Timeout waiting for Rails server to start after ${timeout}s"
406+ exit 1
407+ fi
408+ done
409+ echo "Rails server started after ${elapsed}s"
388410
389411 - name : Install Playwright dependencies
390412 run : cd spec/dummy && yarn playwright install --with-deps
You can’t perform that action at this time.
0 commit comments