GeezerVison is showing github.com — Restore the scripts/test file (#671) · runloopai/api-client-python@b7d7d1e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/smoketests.yml -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
44 | 44 | echo "RUNLOOP_BASE_URL=https://api.runloop.pro" >> $GITHUB_ENV |
45 | 45 | fi |
46 | 46 | echo "DEBUG=false" >> $GITHUB_ENV |
47 | | - echo "RUN_SMOKETESTS=1" >> $GITHUB_ENV |
48 | 47 | echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV |
49 | 48 |
|
50 | 49 | - name: Run smoke tests (pytest via uv) |
|
Collapse file
Copy file name to clipboardExpand all lines: pyproject.toml +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -63,6 +63,9 @@ dev = [ |
63 | 63 | "pytest-xdist>=3.6.1", |
64 | 64 | "uuid-utils>=0.11.0" |
65 | 65 | ] |
| 66 | +pydantic-v1 = [ |
| 67 | + "pydantic>=1.9.0, <2", |
| 68 | +] |
66 | 69 |
|
67 | 70 | [tool.rye.scripts] |
68 | 71 | format = { chain = [ |
|
Collapse file
Copy file name to clipboardExpand all lines: scripts/test +17-8Lines changed: 17 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
54 | 54 |
|
55 | 55 | export DEFER_PYDANTIC_BUILD=false |
56 | 56 |
|
57 | | -echo "==> Running tests" |
| 57 | +function run_tests() { |
| 58 | + echo "==> Running tests with Pydantic v2" |
| 59 | + uv run --isolated --all-extras pytest "$@" |
58 | 60 |
|
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 | +} |
65 | 64 |
|
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 |
67 | 70 |
|
| 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 |