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
6 changes: 4 additions & 2 deletions .github/workflows/test-arealite.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Test AReaLite

on:
push:
pull_request:
branches: [ lite ]
paths:
- .github/workflows/test-arealite.yml
- arealite/**
Expand All @@ -20,11 +21,12 @@ jobs:
env:
GIT_REPO_URL: https://github.bibk.top/${{ github.repository }}
GIT_COMMIT_SHA: ${{ github.sha }}
CI_NODE_SUDO_PW: ${{ secrets.CI_NODE_SUDO_PW }}
with:
host: ${{ secrets.CI_NODE_ADDR }}
username: ${{ secrets.CI_NODE_USER }}
key: ${{ secrets.REMOTE_SSH_KEY }}
envs: GIT_REPO_URL,GIT_COMMIT_SHA
envs: GIT_REPO_URL,GIT_COMMIT_SHA,CI_NODE_SUDO_PW
script_path: ci/clone_repo.sh

- uses: appleboy/ssh-action@v1
Expand Down
6 changes: 4 additions & 2 deletions arealite/tests/test_sglang_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
PORT = 13887
DIST_PORT = 15887
HOST = network.gethostip()
# set a large timeout since we may need to download the model from hub
RUN_SERVER_TIMEOUT = 180


def check_server_health(base_url):
Expand Down Expand Up @@ -65,11 +67,11 @@ def sglang_server():
)
base_url = f"http://{HOST}:{PORT}"
tik = time.time()
while time.time() - tik < 90:
while time.time() - tik < RUN_SERVER_TIMEOUT:
if check_server_health(base_url):
break
time.sleep(1)
if time.time() - tik > 90:
if time.time() - tik > RUN_SERVER_TIMEOUT:
raise RuntimeError("server launch failed")
yield
process.terminate()
Expand Down
2 changes: 1 addition & 1 deletion ci/clone_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ echo "GIT_REPO_URL: $GIT_REPO_URL"
echo "GIT_COMMIT_SHA: $GIT_COMMIT_SHA"

RUN_ID="areal-$GIT_COMMIT_SHA"
rm -rf "/tmp/$RUN_ID"
echo ${CI_NODE_SUDO_PW} | sudo -S rm -rf "/tmp/$RUN_ID"
mkdir -p "/tmp/$RUN_ID"
cd "/tmp/$RUN_ID"

Expand Down