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
1 change: 0 additions & 1 deletion .github/workflows/smoketests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
echo "RUNLOOP_BASE_URL=https://api.runloop.pro" >> $GITHUB_ENV
fi
echo "DEBUG=false" >> $GITHUB_ENV
echo "RUN_SMOKETESTS=1" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this env var unnecessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was for the scripts/test script, and this never invokes that.

echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV

- name: Run smoke tests (pytest via uv)
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ dev = [
"pytest-xdist>=3.6.1",
"uuid-utils>=0.11.0"
]
pydantic-v1 = [
"pydantic>=1.9.0, <2",
]

[tool.rye.scripts]
format = { chain = [
Expand Down
25 changes: 17 additions & 8 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,23 @@ fi

export DEFER_PYDANTIC_BUILD=false

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

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

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

echo "==> Running tests for Python 3.9"
UV_PYTHON=3.9 run_tests "$@"

echo "==> Running tests for Python 3.13"
UV_PYTHON=3.13 run_tests "$@"
fi