Add FAQ on changed cache and cache upload behavior (#477)
Some checks failed
CodeQL / Analyze (TypeScript) (push) Failing after 40s
test / lint (push) Failing after 2m26s
test / test-custom-manifest-file (push) Failing after 14m28s
test / test-no-python-version (push) Failing after 14m28s
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 14m29s
test / test-setup-cache-dependency-glob (push) Failing after 14m30s
test / test-setup-cache-requirements-txt (push) Failing after 14m32s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 14m33s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 14m34s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 14m34s
test / test-musl (push) Failing after 14m37s
test / test-activate-environment (ubuntu-latest) (push) Failing after 14m37s
test / test-python-version (ubuntu-latest) (push) Failing after 14m39s
test / test-tool-install (ubuntu-latest) (push) Failing after 14m40s
test / test-uvx (push) Failing after 14m41s
test / test-with-explicit-token (push) Failing after 14m42s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 14m42s
test / test-uv-file-version (push) Failing after 14m44s
test / test-malformed-pyproject-file-fallback (push) Failing after 14m45s
test / test-pyproject-file-version (push) Failing after 14m46s
test / test-pep440-version (push) Failing after 14m48s
test / test-semver-range (ubuntu-latest) (push) Failing after 14m48s
test / test-specific-version (>=0.3.0) (push) Failing after 14m51s
test / test-specific-version (0.3.x) (push) Failing after 14m53s
test / test-specific-version (0.3.2) (push) Failing after 14m53s
test / test-specific-version (0.3.0) (push) Failing after 14m55s
test / test-specific-version (0.3) (push) Failing after 14m56s
test / test-default-version (ubuntu-latest) (push) Successful in 33m30s
test / test-restore-cache-dependency-glob (push) Has been skipped
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / test-semver-range (selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tool-install (macos-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-requirements-txt (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Update known versions / build (push) Has been cancelled

Closes: #467
This commit is contained in:
Kevin Stillhammer
2025-07-05 11:57:12 +02:00
committed by GitHub
parent aaefb91b77
commit d4219d1620

View File

@ -542,6 +542,23 @@ Running `actions/checkout` after `setup-uv` **is not supported**.
No, `setup-uv` alone wont install any libraries from your `pyproject.toml` or `requirements.txt`, it only sets up `uv`.
You should run `uv sync` or `uv pip install .` separately, or use `uv run ...` to ensure necessary dependencies are installed.
### Why is a changed cache not detected and not the full cache uploaded?
When `setup-uv` starts it has to know whether it is better to download an existing cache
or start fresh and download every dependency again.
It does this by using a combination of hashes calculated on the contents of e.g. `uv.lock`.
By calculating these hashes and combining them in a key `setup-uv` can check
if an uploaded cache exists for this key.
If yes (e.g. contents of `uv.lock` did not change since last run) the dependencies in the cache
are up to date and the cache will be downloaded and used.
Details on determining which files will lead to different caches can be read under
[cache-dependency-glob](#cache-dependency-glob)
Some dependencies will never be uploaded to the cache and will be downloaded again on each run
as described in [disable-cache-pruning](#disable-cache-pruning)
## Acknowledgements
`setup-uv` was initially written and published by [Kevin Stillhammer](https://github.com/eifinger)