Skip to content

Commit 08b4d3a

Browse files
authored
Update setup-uv action to v5, tweak install and setup (#310)
v5 of `setup-uv` adds caching and a default venv, so things should be a bit faster on repeated runs. Since `python-version` allows bootstrapping a Python version directly on action setup, we do that instead.
1 parent 05a4d55 commit 08b4d3a

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.github/actions/python-deps/action.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ runs:
88
using: "composite"
99
steps:
1010
- name: Install uv
11-
uses: astral-sh/setup-uv@v4
12-
- name: Install Python interpreter
13-
run: uv python install ${{ inputs.pythonVersion }}
14-
shell: bash
11+
uses: astral-sh/setup-uv@v5
12+
with:
13+
python-version: ${{ inputs.pythonVersion }}
1514
- name: Install the project
1615
run: uv sync --frozen --all-groups
1716
shell: bash

.github/workflows/python.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Install uv
21-
uses: astral-sh/setup-uv@v4
2220
- name: Set up Python 3.10 and dependencies
2321
uses: ./.github/actions/python-deps
2422
with:
2523
pythonVersion: "3.10"
2624
- name: Run pre-commit checks
27-
run: uvx pre-commit run --all-files --verbose --show-diff-on-failure
25+
run: uv run pre-commit run --all-files --verbose --show-diff-on-failure
2826
test:
2927
strategy:
3028
fail-fast: false
@@ -55,9 +53,9 @@ jobs:
5553
steps:
5654
- uses: actions/checkout@v4
5755
- name: Install uv
58-
uses: astral-sh/setup-uv@v4
59-
- name: Install Python ${{ matrix.python-version }}
60-
run: uv python install ${{ matrix.python-version }}
56+
uses: astral-sh/setup-uv@v5
57+
with:
58+
python-version: ${{ matrix.python-version }}
6159
- name: "Install deps: ${{ matrix.deps.lakefs }}, ${{ matrix.deps.fsspec }}"
6260
run: |
6361
uv lock -P ${{ matrix.deps.lakefs }}
@@ -91,8 +89,6 @@ jobs:
9189
- uses: actions/checkout@v4
9290
with:
9391
fetch-depth: 0
94-
- name: Install uv
95-
uses: astral-sh/setup-uv@v4
9692
- name: Set up Python 3.11 and dependencies
9793
uses: ./.github/actions/python-deps
9894
with:

0 commit comments

Comments
 (0)