Skip to content

Commit c00ce17

Browse files
committed
ci: simplify UV dependency caching in backend workflows
- Replaced `actions/cache` with native caching options in `setup-uv` for both `test-backend.yml` and `lint-backend.yml`. - Updated caching configuration to use `enable-cache` and `cache-dependency-glob` settings for improved clarity and maintainability.
1 parent c2c414f commit c00ce17

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

.github/workflows/lint-backend.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,8 @@ jobs:
3232
uses: astral-sh/setup-uv@v5
3333
with:
3434
version: "0.9.18"
35-
36-
- name: Cache uv dependencies
37-
uses: actions/cache@v4
38-
with:
39-
path: ~/.cache/uv
40-
key: uv-${{ runner.os }}-${{ hashFiles('backend/uv.lock') }}
41-
restore-keys: uv-${{ runner.os }}-
35+
enable-cache: true
36+
cache-dependency-glob: "backend/uv.lock"
4237

4338
- name: Install dependencies
4439
run: uv sync

.github/workflows/test-backend.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,8 @@ jobs:
4242
uses: astral-sh/setup-uv@v5
4343
with:
4444
version: "0.9.18"
45-
46-
- name: Cache uv dependencies
47-
uses: actions/cache@v4
48-
with:
49-
path: ~/.cache/uv
50-
key: uv-${{ runner.os }}-${{ hashFiles('backend/uv.lock') }}
51-
restore-keys: uv-${{ runner.os }}-
45+
enable-cache: true
46+
cache-dependency-glob: "backend/uv.lock"
5247

5348
- name: Install dependencies
5449
run: uv sync --extra test --extra migrations --extra metrics

0 commit comments

Comments
 (0)