Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,20 +183,28 @@ jobs:

- name: Create app directory
run: mkdir rx-shout-from-template
- name: Init reflex-web from template
- name: Init rx-shout from template
run: uv run reflex init --template https://github.com/masenf/rx_shout
working-directory: ./rx-shout-from-template
- name: ignore reflex pin in requirements
run: sed -i -e '/reflex==/d' requirements.txt
- name: Override reflex sources to local checkout
# Force reflex install editable from this repo instead of PyPI.
working-directory: ./rx-shout-from-template
- name: Install additional dependencies
run: uv pip install -r requirements.txt
run: |
cat >> pyproject.toml <<'EOF'

[tool.uv.sources]
reflex = { path = "..", editable = true }
EOF
- name: Install rx-shout dependencies
# Re-locks because pyproject.toml changed; --prerelease=allow matches
# the template's own lock options (rx_shout depends on reflex pre-releases).
working-directory: ./rx-shout-from-template
- name: Run Website and Check for errors
run: uv sync --prerelease=allow
- name: Run App and Check for errors
run: |
# Check that npm is home
npm -v
uv run bash scripts/integration.sh ./rx-shout-from-template prod
uv run --project ./rx-shout-from-template --no-sync bash scripts/integration.sh ./rx-shout-from-template prod

reflex-docs-macos:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down
19 changes: 16 additions & 3 deletions scripts/wait_for_listening_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,29 @@
"""

import argparse
import os
import socket
import sys
import time
from concurrent.futures import ThreadPoolExecutor, as_completed


def _pid_exists(pid: int):
# Note: For windows, the pid here is really the "winpid".
import psutil
# On Windows the pid here is really the "winpid"; os.kill(pid, 0) only
# accepts CTRL_*_EVENT signals on Windows, so fall back to psutil there.
# psutil is a runtime dep of reflex on win32 (see pyproject.toml), so
# any venv with reflex installed already has it.
if sys.platform == "win32":
import psutil

return psutil.pid_exists(pid)
return psutil.pid_exists(pid)
try:
os.kill(pid, 0)
except ProcessLookupError:
return False
except PermissionError:
return True
return True


def _wait_for_port(port: int, server_pid: int, timeout: float) -> tuple[bool, str]:
Expand Down
Loading