Skip to content

Commit 0afdd5f

Browse files
committed
Restore the scripts/test file
Changes were made here to avoid running smoketests by default, but these were unneccessary and were causing a merge conflict. Smoketests are disabled by default in pyproject.toml, and the github action that runs smoke tests already enables them and runs them directly.
1 parent c7715c7 commit 0afdd5f

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

.github/workflows/smoketests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
echo "RUNLOOP_BASE_URL=https://api.runloop.pro" >> $GITHUB_ENV
4545
fi
4646
echo "DEBUG=false" >> $GITHUB_ENV
47-
echo "RUN_SMOKETESTS=1" >> $GITHUB_ENV
4847
echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV
4948
5049
- name: Run smoke tests (pytest via uv)

scripts/test

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,23 @@ fi
5454

5555
export DEFER_PYDANTIC_BUILD=false
5656

57-
echo "==> Running tests"
57+
function run_tests() {
58+
echo "==> Running tests with Pydantic v2"
59+
uv run --isolated --all-extras pytest "$@"
5860

59-
# By default, exclude smoketests unless explicitly enabled.
60-
# This ensures PR CI doesn't run E2E smoketests unless RUN_SMOKETESTS=1.
61-
PYTEST_ARGS=()
62-
if [ "${RUN_SMOKETESTS}" != "1" ]; then
63-
PYTEST_ARGS+=( -m "not smoketest" )
64-
fi
61+
echo "==> Running tests with Pydantic v1"
62+
uv run --isolated --all-extras --group=pydantic-v1 pytest "$@"
63+
}
6564

66-
uv run pytest "${PYTEST_ARGS[@]}" "$@"
65+
# If UV_PYTHON is already set in the environment, just run the command once
66+
if [[ -n "$UV_PYTHON" ]]; then
67+
run_tests "$@"
68+
else
69+
# If UV_PYTHON is not set, run the command for min and max versions
6770

71+
echo "==> Running tests for Python 3.9"
72+
UV_PYTHON=3.9 run_tests "$@"
73+
74+
echo "==> Running tests for Python 3.13"
75+
UV_PYTHON=3.13 run_tests "$@"
76+
fi

0 commit comments

Comments
 (0)