Skip to content

Commit 4bd5e2f

Browse files
committed
Add caching for uv and .venv directories in CI
1 parent 387217f commit 4bd5e2f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# .github/workflows/ci.yml
12
name: CI
23
on: [push, pull_request]
34

@@ -14,9 +15,20 @@ jobs:
1415
- { name: "make format --check", cmd: "make format FLAGS=--check" }
1516
steps:
1617
- uses: actions/checkout@v4
18+
19+
- name: Cache uv
20+
uses: actions/cache@v4
21+
with:
22+
path: |
23+
~/.cache/uv
24+
.venv
25+
key: ${{ runner.os }}-uv-${{ hashFiles('**/uv.lock', '**/pyproject.toml') }}
26+
restore-keys: ${{ runner.os }}-uv-
27+
1728
- name: Install uv
1829
run: |
1930
set -euxo pipefail
2031
curl -LsSf https://astral.sh/uv/install.sh | sh
2132
echo "$HOME/.local/bin" >> $GITHUB_PATH
33+
2234
- run: ${{ matrix.cmd }}

0 commit comments

Comments
 (0)