From 7a56950bab323ab8f77f211e1d2522f2e3ead2ba Mon Sep 17 00:00:00 2001 From: Ali Chaudry Date: Mon, 21 Jul 2025 15:48:47 -0400 Subject: [PATCH] Update `setup-uv` docs for Github Actions integration guide (re-order python and uv setup) (#14741) I updated the Github Actions integration guide to run Github's `setup-python` before Astral's `setup-uv`, as `setup-uv`'s `activate-environment: true` doesn't work with the original ordering. There is a discussion about this behavior in the `setup-uv` repo [here](https://github.com/astral-sh/setup-uv/issues/479). ## Summary Update the documentation for the Github Actions integration. Caveat: I'm unsure if there are any other reasons where the original ordering (that is,`setup-uv` before `setup-python`) might be preferred. ## Test Plan Tested in a private Github Actions push, as documented in the aforementioned discussion on `setup-uv`'s repo. Confirmed that removing `source .venv/bin/activate` and replacing it with `activate-environment: true` now works in this ordering (but didn't work with the original ordering where `uv` installs before Github's `python`). --- docs/guides/integration/github.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/guides/integration/github.md b/docs/guides/integration/github.md index 15d26b280..220db8fc8 100644 --- a/docs/guides/integration/github.md +++ b/docs/guides/integration/github.md @@ -92,13 +92,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install uv - uses: astral-sh/setup-uv@v6 - - name: "Set up Python" uses: actions/setup-python@v5 with: python-version-file: ".python-version" + + - name: Install uv + uses: astral-sh/setup-uv@v6 ``` Or, specify the `pyproject.toml` file to ignore the pin and use the latest version compatible with @@ -115,13 +115,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install uv - uses: astral-sh/setup-uv@v6 - - name: "Set up Python" uses: actions/setup-python@v5 with: python-version-file: "pyproject.toml" + + - name: Install uv + uses: astral-sh/setup-uv@v6 ``` ## Multiple Python versions