Skip to content

Commit 3030139

Browse files
committed
use uv action
1 parent 772cfcb commit 3030139

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

.github/workflows/main.yaml

+10-16
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,30 @@ on:
99

1010
jobs:
1111
lint:
12-
env:
13-
UV_CACHE_DIR: /tmp/.uv-cache
14-
1512
runs-on: ubuntu-latest
1613
steps:
17-
- name: Restore uv cache
18-
uses: actions/cache@v4
14+
- uses: actions/checkout@v4
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
1917
with:
20-
path: /tmp/.uv-cache
21-
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
22-
restore-keys: |
23-
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
24-
uv-${{ runner.os }}
18+
version: "0.4.24"
19+
enable-cache: true
20+
2521
- name: pre-commit cache key
2622
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
2723
- uses: actions/cache@v4
2824
with:
2925
path: ~/.cache/pre-commit
3026
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
31-
- uses: actions/checkout@v4
32-
- name: Set up uv
33-
run: curl -LsSf https://astral.sh/uv/0.4.0/install.sh | sh
34-
- name: Set up Python
27+
28+
- name: Install Python
3529
run: uv python install
30+
3631
- name: install dependencies
3732
run: uv sync
33+
3834
- name: pre-commit
3935
run: uv run pre-commit run --all-files
40-
- name: Minimize uv cache
41-
run: uv cache prune --ci
4236

4337
deploy:
4438
needs: [lint]

0 commit comments

Comments
 (0)