Skip to content

Commit 5ba2c12

Browse files
chore: Optimize GitHub Actions workflows (#10)
1 parent 87ec85d commit 5ba2c12

File tree

7 files changed

+167
-190
lines changed

7 files changed

+167
-190
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Setup Python with uv
2+
description: Install uv and cache dependencies
3+
inputs:
4+
python-version:
5+
description: Python version to use (optional, for matrix builds)
6+
required: false
7+
default: ''
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Install uv
12+
uses: astral-sh/setup-uv@v7
13+
14+
- name: Cache uv dependencies
15+
uses: actions/cache@v4
16+
with:
17+
path: |
18+
~/.cache/uv
19+
.venv
20+
key: uv-${{ runner.os }}-${{ inputs.python-version || 'default' }}-${{ hashFiles('**/pyproject.toml', '**/uv.lock') }}
21+
restore-keys: |
22+
uv-${{ runner.os }}-${{ inputs.python-version || 'default' }}-
23+
uv-${{ runner.os }}-
24+
25+
- name: Install Python (uv-managed)
26+
if: ${{ inputs.python-version != '' }}
27+
shell: bash
28+
run: uv python install ${{ inputs.python-version }}

0 commit comments

Comments
 (0)