From 581a82d370e344d089ad47c7e67be17df26cd3e1 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 21 Jan 2025 09:02:14 -0600 Subject: [PATCH] Install Python via uv in Windows CI (#10657) Python 3.8 is a GHA cache miss now, so it is actually like 30-45s. uv may be faster --- .github/workflows/ci.yml | 15 +++------------ crates/uv/tests/it/common/mod.rs | 1 + 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9d9b9a2e..78627a015 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -268,18 +268,9 @@ jobs: run: | Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.UV_WORKSPACE }}" -Recurse - # We do not test with Python patch versions on Windows - # so we can use `setup-python` instead of our bootstrapping code - # this is much faster on the extremely slow GitHub Windows runners. - - uses: actions/setup-python@v5 - with: - python-version: | - 3.8 - 3.9 - 3.10 - 3.11 - 3.12 - 3.13 + - uses: astral-sh/setup-uv@v5 + - name: "Install required Python versions" + run: uv python install - uses: Swatinem/rust-cache@v2 with: diff --git a/crates/uv/tests/it/common/mod.rs b/crates/uv/tests/it/common/mod.rs index 63e7d1923..8247cae92 100644 --- a/crates/uv/tests/it/common/mod.rs +++ b/crates/uv/tests/it/common/mod.rs @@ -479,6 +479,7 @@ impl TestContext { .env(EnvVars::UV_TEST_PYTHON_PATH, self.python_path()) .env(EnvVars::UV_EXCLUDE_NEWER, EXCLUDE_NEWER) .env_remove(EnvVars::UV_CACHE_DIR) + .env_remove(EnvVars::UV_TOOL_BIN_DIR) .current_dir(self.temp_dir.path()); if activate_venv {