File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,21 +52,28 @@ jobs:
5252 with :
5353 python-version : ${{ matrix.python-version }}
5454
55-
5655 - name : Install uv
5756 # https://docs.astral.sh/uv/guides/integration/github/#caching
5857 uses : astral-sh/setup-uv@v6
5958 with :
6059 version : " latest"
6160
61+ - name : Compute uv hash
62+ id : uvhash
63+ run : |
64+ hash="$(sha1sum pyproject.toml 2>/dev/null || echo '')"
65+ lock="$(sha1sum uv.lock 2>/dev/null || echo '')"
66+ echo "UV_HASH=$hash$lock"
67+ echo "UV_HASH=$hash$lock" >> $GITHUB_ENV
68+
6269 - name : Cache uv
6370 uses : actions/cache@v4
71+ env :
72+ KEY_BASE : ${{ runner.os }}-uv-${{ matrix.python-version }}-
6473 with :
6574 path : ~/.cache/uv
66- key : >-
67- ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
68- restore-keys : |
69- ${{ runner.os }}-uv-${{ matrix.python-version }}-
75+ key : ${{ env.KEY_BASE }}${{ env.UV_HASH }}
76+ restore-keys : ${{ env.KEY_BASE }}
7077
7178 - name : Create venv
7279 run : |
You can’t perform that action at this time.
0 commit comments