Skip to content

Commit 7a56950

Browse files
authored
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](astral-sh/setup-uv#479). <!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## 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`).
1 parent 2c8e394 commit 7a56950

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/guides/integration/github.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ jobs:
9292
steps:
9393
- uses: actions/checkout@v4
9494
95-
- name: Install uv
96-
uses: astral-sh/setup-uv@v6
97-
9895
- name: "Set up Python"
9996
uses: actions/setup-python@v5
10097
with:
10198
python-version-file: ".python-version"
99+
100+
- name: Install uv
101+
uses: astral-sh/setup-uv@v6
102102
```
103103

104104
Or, specify the `pyproject.toml` file to ignore the pin and use the latest version compatible with
@@ -115,13 +115,13 @@ jobs:
115115
steps:
116116
- uses: actions/checkout@v4
117117
118-
- name: Install uv
119-
uses: astral-sh/setup-uv@v6
120-
121118
- name: "Set up Python"
122119
uses: actions/setup-python@v5
123120
with:
124121
python-version-file: "pyproject.toml"
122+
123+
- name: Install uv
124+
uses: astral-sh/setup-uv@v6
125125
```
126126

127127
## Multiple Python versions

0 commit comments

Comments
 (0)