run_ui_tests.sh 683 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. set -x
  3. set -euo pipefail
  4. ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
  5. cd "$ROOT_DIR"
  6. clean_up() {
  7. ray stop --force
  8. }
  9. trap clean_up EXIT
  10. echo "Installing cypress"
  11. if [ -n "$BUILDKITE" ]; then
  12. apt install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
  13. sudo npm install cypress
  14. else
  15. which cypress || npm install cypress -g
  16. fi
  17. ray stop --force
  18. ray start --head --dashboard-port=8653 --dashboard-host=0.0.0.0
  19. sleep 5 # Wait for Ray dashboard to become ready
  20. curl localhost:8653 || cat /tmp/ray/session_latest/logs/dashboard.log
  21. node_modules/.bin/cypress run --project . --headless