Skip to content

Commit

Permalink
ci: use astral-sh/setup-uv (#493)
Browse files Browse the repository at this point in the history
* ci: use astral-sh/setup-uv

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* ci: add to path

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii authored Sep 17, 2024
1 parent b2c8259 commit 99acb84
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/reusable-cookie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ jobs:
allow-prereleases: true

- name: Setup uv
uses: yezz123/setup-uv@v4
with:
uv-venv: ".venv"
uses: astral-sh/setup-uv@v2

- name: Add .local/bin to Windows PATH
if: runner.os == 'Windows'
shell: bash
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH

- name: Install nox
run: uv pip install nox
run: uv tool install nox

- name: Test setuptools
run: nox -s 'tests(setuptools, novcs)' -s 'tests(setuptools, vcs)'
Expand Down Expand Up @@ -117,12 +120,10 @@ jobs:
allow-prereleases: true

- name: Setup uv
uses: yezz123/setup-uv@v4
with:
uv-venv: ".venv"
uses: astral-sh/setup-uv@v3

- name: Install nox
run: uv pip install nox
run: uv tool install nox

- name: Test setuptools
run: |
Expand Down
4 changes: 1 addition & 3 deletions docs/pages/guides/gha_basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ And many other useful ones:
Make a new PR with the current changes (more options than just using `gh`).
You can even auto-merge PRs with `run: gh pr merge --merge --auto "1"`
afterwards.
- [yezz123/setup-uv](https://github.com/yezz123/setup-uv): Set up `uv`. Has a
handy `uv-venv` option that will also set up and activate a virtual
environment for you.
- [astral-sh/setup-uv](https://github.com/astral/setup-uv): Set up `uv`.
- [gautamkrishnar/keepalive-workflow](https://github.com/gautamkrishnar/keepalive-workflow):
Keep GitHub actions alive for more than 60 days. Not usually needed if you've
set up the other suggestions here, like dependabot and pre-commit.
Expand Down
6 changes: 1 addition & 5 deletions docs/pages/guides/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,9 @@ You can install `uv` with `pipx`, `brew`, etc. If you want to use uv in GitHub
Actions, one way is to use this:

```yaml
- name: Setup uv
uses: yezz123/setup-uv@v4
- uses: astral-sh/setup-uv@v2
```

You do not need to set `with: uv-venv: ".venv"` for `nox` to be able to use
`uv`.

Check your jobs with `uv`; most things do not need to change. The main
difference is `uv` doesn't install `pip` unless you ask it to. If you want to
interact with uv, nox might be getting uv from it's environment instead of the
Expand Down

0 comments on commit 99acb84

Please sign in to comment.