From 479c0345732180cc82941e3f653a80607737c84a Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 16 Jul 2025 17:50:08 -0400 Subject: [PATCH] fix windows ci hangs --- scripts/run_ci_tests.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/run_ci_tests.sh b/scripts/run_ci_tests.sh index 665e3a5..661aa47 100755 --- a/scripts/run_ci_tests.sh +++ b/scripts/run_ci_tests.sh @@ -1,9 +1,14 @@ #!/usr/bin/env bash set -eo pipefail -pytest_cmd=(pytest -vv ${STRESS_ARGS} \ - --cov=src --cov-report=xml --cov-report=term-missing \ - --cov-fail-under=20 src/tests) +pytest_args=(-vv) +if [[ -n "${STRESS_ARGS:-}" ]]; then + pytest_args+=(${STRESS_ARGS}) +fi +if [[ "${RUNNER_OS:-}" == "Windows" ]]; then + pytest_args+=(-n 1) +fi +pytest_args+=(--cov=src --cov-report=xml --cov-report=term-missing --cov-fail-under=20 src/tests) timeout_bin="timeout" if ! command -v "$timeout_bin" >/dev/null 2>&1; then @@ -15,11 +20,11 @@ if ! command -v "$timeout_bin" >/dev/null 2>&1; then fi if [[ -n "$timeout_bin" ]]; then - $timeout_bin 15m "${pytest_cmd[@]}" 2>&1 | tee pytest.log + $timeout_bin 15m pytest "${pytest_args[@]}" 2>&1 | tee pytest.log status=${PIPESTATUS[0]} else echo "timeout command not found; running tests without timeout" >&2 - "${pytest_cmd[@]}" 2>&1 | tee pytest.log + pytest "${pytest_args[@]}" 2>&1 | tee pytest.log status=${PIPESTATUS[0]} fi