@@ -8,32 +8,15 @@ SAM_CLI_TELEMETRY ?= 0
88init :
99 @if [ " $$ GITHUB_ACTIONS" = " true" ]; then \
1010 command -v uv > /dev/null 2>&1 || pip install uv==0.9.1; \
11- SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python " $$ (uv python find)" -e ' .[dev]' ; \
11+ echo " === UV_PYTHON resolved to: $$ (uv python find $$ UV_PYTHON) ===" ; \
12+ SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python " $$ (uv python find $$ UV_PYTHON)" -e ' .[dev]' ; \
1213 else \
1314 SAM_CLI_DEV=1 pip install -e ' .[dev]' ; \
1415 fi
1516
1617# Set up a pytest venv with test dependencies (cross-platform)
1718setup-pytest :
18- @if [ " $$ {RUNNER_OS:-}" = " Windows" ]; then \
19- python3.11 -m venv $(HOME ) /pytest; \
20- VENV_PY=" $( HOME) /pytest/Scripts/python.exe" ; \
21- SAM_CLI_DEV=1 uv pip install --python " $$ VENV_PY" -e ' .[dev]' ; \
22- " $( HOME) /pytest/Scripts/pytest" --version; \
23- if [ -n " $$ GITHUB_ENV" ]; then \
24- echo " SCRIPT_PY=$$ VENV_PY" >> " $$ GITHUB_ENV" ; \
25- echo " $( HOME) /pytest/Scripts" >> " $$ GITHUB_PATH" ; \
26- fi ; \
27- else \
28- python3.11 -m venv $(HOME ) /pytest; \
29- VENV_PY=" $( HOME) /pytest/bin/python3" ; \
30- SAM_CLI_DEV=1 uv pip install --python " $$ VENV_PY" -e ' .[dev]' ; \
31- sudo ln -sf $(HOME ) /pytest/bin/pytest /usr/local/bin/pytest 2> /dev/null || true ; \
32- $(HOME ) /pytest/bin/pytest --version; \
33- if [ -n " $$ GITHUB_ENV" ]; then \
34- echo " SCRIPT_PY=$$ VENV_PY" >> " $$ GITHUB_ENV" ; \
35- fi ; \
36- fi
19+ bash tests/setup-pytest.sh
3720# Install SAM CLI nightly binary
3821init-nightly :
3922 bash tests/install-sam-cli-binary.sh sam-cli-nightly
0 commit comments