Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use astral-sh/setup-uv #493

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading