From 32cef18a489c9ab1616fb95d333294c516465980 Mon Sep 17 00:00:00 2001 From: vansangpfiev Date: Wed, 2 Oct 2024 07:10:15 +0700 Subject: [PATCH] f:m --- .github/workflows/template-build-linux-x64.yml | 15 ++++++++++++++- .github/workflows/template-build-windows-x64.yml | 13 +++++++++++++ engine/e2e-test/test_runner.py | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template-build-linux-x64.yml b/.github/workflows/template-build-linux-x64.yml index 9cefe447e..df67f38c3 100644 --- a/.github/workflows/template-build-linux-x64.yml +++ b/.github/workflows/template-build-linux-x64.yml @@ -127,7 +127,20 @@ jobs: run: | cd engine make build CMAKE_EXTRA_FLAGS="${{ inputs.cmake-flags }}" BUILD_DEPS_CMAKE_EXTRA_FLAGS="${{ inputs.build-deps-cmake-flags }}" - + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Run e2e tests + run: | + python -m pip install --upgrade pip + python -m pip install pytest + python -m pip install requests + cd engine + python e2e-test/main.py + - name: Pre-package run: | cd engine diff --git a/.github/workflows/template-build-windows-x64.yml b/.github/workflows/template-build-windows-x64.yml index 73f3ccb0e..094f4e995 100644 --- a/.github/workflows/template-build-windows-x64.yml +++ b/.github/workflows/template-build-windows-x64.yml @@ -164,6 +164,19 @@ jobs: cd engine make build CMAKE_EXTRA_FLAGS="${{ inputs.cmake-flags }}" BUILD_DEPS_CMAKE_EXTRA_FLAGS="${{ inputs.build-deps-cmake-flags }}" + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Run e2e tests + run: | + python -m pip install --upgrade pip + python -m pip install pytest + python -m pip install requests + cd engine + python e2e-test/main.py + - name: Pre-package run: | cd engine diff --git a/engine/e2e-test/test_runner.py b/engine/e2e-test/test_runner.py index 320b8e332..0a0bb1511 100644 --- a/engine/e2e-test/test_runner.py +++ b/engine/e2e-test/test_runner.py @@ -79,7 +79,7 @@ def start_server_nix() -> bool: start_time = time.time() while time.time() - start_time < timeout: # Use select to check if there's data to read from stdout or stderr - readable, _, _ = select.select([process.stdout, process.stderr], [], [], 0.1) + readable, _, _ = select.select([process.stdout, process.stderr], [], [], 3.0) for stream in readable: line = stream.readline()