integration.sh 641 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Change directory to the first argument passed to the script
  3. pushd "$1" || exit 1
  4. echo "Changed directory to $1"
  5. # So we get stdout / stderr from Python ASAP. Without this, delays can be very long (e.g. on Windows, Github Actions)
  6. export PYTHONUNBUFFERED=1
  7. # Start the server in the background
  8. reflex run --loglevel debug --env "$2" & pid=$!
  9. # TODO does this even work on windows? Not clear, possibly not impactful though.
  10. trap "kill -INT $pid ||:" EXIT
  11. echo "Started server with PID $pid"
  12. # Assume we run from the root of the repo
  13. popd
  14. python scripts/wait_for_listening_port.py 3000 8000 --timeout=600 --server-pid "$pid"