Compare commits

..
3 Commits
Author SHA1 Message Date
20cfd1bf94 chore: update known checksums for 0.12.4 (#1017)
test / test-default-version (ubuntu-latest) (push) Failing after 1m6s
test / test-specific-version (map[expected-version:0.1.45 resolution-strategy:highest version-input:>=0.1,<0.2]) (push) Failing after 1m11s
CodeQL / Analyze (TypeScript) (push) Failing after 2m0s
test / test-version-file-version (map[expected-version:0.5.15 version-file:__tests__/fixtures/.tool-versions]) (push) Failing after 1m0s
test / test-version-file-version (map[expected-version:0.6.17 version-file:__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt]) (push) Failing after 58s
test / test-malformed-pyproject-file-fallback (push) Failing after 50s
test / test-tool-versions-python-version (push) Failing after 51s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 52s
test / test-uvx (push) Failing after 51s
test / test-with-explicit-token (push) Failing after 53s
test / test-python-version (ubuntu-latest) (push) Failing after 53s
test / test-activate-environment (ubuntu-latest) (push) Failing after 54s
test / test-activate-environment-custom-path (ubuntu-latest) (push) Failing after 53s
test / test-tool-install (ubuntu-latest) (push) Failing after 53s
test / test-musl (push) Failing after 16s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3]) (push) Failing after 1m2s
test / test-specific-version (map[expected-version:0.3.2 version-input:0.3.2]) (push) Failing after 1m3s
test / test-uv-no-modify-path (push) Failing after 1m18s
test / test-from-working-directory-version (map[expected-version:0.5.14 working-directory:__tests__/fixtures/pyproject-toml-project]) (push) Failing after 1m18s
test / test-latest-version (>=0.8) (push) Failing after 1m19s
test / test-specific-version (map[expected-version:0.4.30 version-input:>=0.4.25,<0.5]) (push) Failing after 1m20s
test / test-from-working-directory-version (map[expected-version:0.5.15 working-directory:__tests__/fixtures/uv-toml-project]) (push) Failing after 54s
test / test-version-file-version (map[expected-version:0.8.3 version-file:__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt]) (push) Failing after 54s
test / test-cache-key-os-version (ubuntu-22.04, ubuntu-22.04) (push) Failing after 50s
test / test-specific-version (map[expected-version:0.1.0 resolution-strategy:lowest version-input:>=0.1.0,<0.2]) (push) Failing after 1m14s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3.x]) (push) Failing after 1m15s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25]) (push) Failing after 1m15s
test / test-specific-version (map[expected-version:0.3.0 version-input:0.3.0]) (push) Failing after 1m16s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25,<0.5]) (push) Failing after 1m17s
test / test-latest-version (latest) (push) Failing after 1m21s
test / test-restore-cache-requirements-txt (push) Skipped
test / test-setup-cache-dependency-glob (push) Failing after 56s
test / test-setup-cache-save-cache-false (push) Failing after 57s
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 59s
test / test-cache-local-cache-disabled-but-explicit-path (push) Failing after 56s
test / test-custom-manifest-file (push) Failing after 58s
test / test-download-from-astral-mirror-false (push) Failing after 59s
test / test-relative-path (push) Failing after 55s
test / test-cache-python-installs (push) Failing after 43s
test / test-restore-python-installs (push) Skipped
test / test-activate-environment-no-project (push) Failing after 55s
test / test-debian-unstable (push) Failing after 33s
test / lint (push) Failing after 2m38s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 53s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 56s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 56s
test / test-restore-cache-dependency-glob (push) Skipped
test / test-setup-cache-restore-cache-false (push) Failing after 54s
test / test-restore-cache-restore-cache-false (push) Skipped
test / test-cache-local-cache-disabled (push) Failing after 54s
test / test-restore-cache-save-cache-false (push) Skipped
test / test-no-python-version (push) Failing after 1m1s
test / test-absolute-path (push) Failing after 54s
test / test-setup-cache-requirements-txt (push) Failing after 56s
test / test-cache-prune-force (push) Failing after 43s
test / test-workflow-run (push) Failing after 38s
test / test-cache-python-missing-managed-install-dir (push) Failing after 41s
test / test-python-install-dir (map[expected-python-dir:/home/runner/work/_temp/uv-python-dir os:ubuntu-latest]) (push) Failing after 41s
test / test-cache-dir-from-file (push) Failing after 47s
test / test-act (push) Failing after 41s
test / validate-typings (push) Successful in 39s
test / test-default-version (macos-14) (push) Canceled after 0s
test / test-default-version (macos-latest) (push) Canceled after 0s
test / test-default-version (windows-latest) (push) Canceled after 0s
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Canceled after 0s
test / test-tool-install (macos-14) (push) Canceled after 0s
test / test-tool-install (macos-latest) (push) Canceled after 0s
test / test-tool-install (windows-latest) (push) Canceled after 0s
test / test-python-version (macos-latest) (push) Canceled after 0s
test / test-python-version (windows-latest) (push) Canceled after 0s
test / test-activate-environment (macos-latest) (push) Canceled after 0s
test / test-activate-environment (windows-latest) (push) Canceled after 0s
test / test-activate-environment-custom-path (macos-latest) (push) Canceled after 0s
test / test-activate-environment-custom-path (windows-latest) (push) Canceled after 0s
test / test-cache-key-os-version (macos-14, macos-14) (push) Canceled after 0s
test / test-cache-key-os-version (macos-15, macos-15) (push) Canceled after 0s
test / test-cache-key-os-version (ubuntu-24.04, ubuntu-24.04) (push) Canceled after 0s
test / test-cache-key-os-version (windows-2022, windows-2022) (push) Canceled after 0s
test / test-cache-key-os-version (windows-2025, windows-2025) (push) Canceled after 0s
test / test-setup-cache (auto, windows-latest) (push) Canceled after 0s
test / test-setup-cache (false, windows-latest) (push) Canceled after 0s
test / test-setup-cache (true, windows-latest) (push) Canceled after 0s
test / test-restore-cache (auto, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (auto, windows-latest) (push) Canceled after 0s
test / test-restore-cache (false, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (false, windows-latest) (push) Canceled after 0s
test / test-restore-cache (true, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (true, windows-latest) (push) Canceled after 0s
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Canceled after 0s
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Canceled after 0s
test / all-tests-passed (push) Canceled after 0s
Release Drafter / ✏️ Draft release (push) Canceled after 0s
chore: update known checksums for 0.12.4

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-08-14 07:39:05 +02:00
d73a0cab66 Tolerate transient manifest timeouts (#1016)
test / test-latest-version (latest) (push) Failing after 56s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25]) (push) Failing after 59s
test / test-version-file-version (map[expected-version:0.8.3 version-file:__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt]) (push) Failing after 24s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 32s
test / test-with-explicit-token (push) Failing after 32s
test / test-uvx (push) Failing after 32s
test / test-tool-install (ubuntu-latest) (push) Failing after 33s
test / test-debian-unstable (push) Failing after 27s
test / test-activate-environment-no-project (push) Failing after 36s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 32s
test / test-cache-key-os-version (ubuntu-22.04, ubuntu-22.04) (push) Failing after 39s
test / test-setup-cache-dependency-glob (push) Failing after 26s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3.x]) (push) Failing after 39s
test / test-uv-no-modify-path (push) Failing after 43s
test / test-specific-version (map[expected-version:0.4.30 version-input:>=0.4.25,<0.5]) (push) Failing after 39s
test / test-from-working-directory-version (map[expected-version:0.5.14 working-directory:__tests__/fixtures/pyproject-toml-project]) (push) Failing after 55s
test / test-python-version (ubuntu-latest) (push) Failing after 34s
test / test-activate-environment-custom-path (ubuntu-latest) (push) Failing after 33s
test / test-setup-cache-save-cache-false (push) Failing after 30s
test / test-setup-cache-restore-cache-false (push) Failing after 31s
test / test-restore-cache-restore-cache-false (push) Skipped
test / test-cache-local-cache-disabled-but-explicit-path (push) Failing after 32s
test / test-no-python-version (push) Failing after 39s
test / test-cache-prune-force (push) Failing after 34s
test / test-absolute-path (push) Failing after 37s
test / test-cache-python-missing-managed-install-dir (push) Failing after 31s
test / test-cache-dir-from-file (push) Failing after 37s
test / test-python-install-dir (map[expected-python-dir:/home/runner/work/_temp/uv-python-dir os:ubuntu-latest]) (push) Failing after 29s
test / test-latest-version (>=0.8) (push) Failing after 44s
test / test-default-version (ubuntu-latest) (push) Failing after 51s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25,<0.5]) (push) Failing after 53s
test / test-specific-version (map[expected-version:0.1.45 resolution-strategy:highest version-input:>=0.1,<0.2]) (push) Failing after 54s
test / test-specific-version (map[expected-version:0.1.0 resolution-strategy:lowest version-input:>=0.1.0,<0.2]) (push) Failing after 54s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3]) (push) Failing after 54s
test / test-specific-version (map[expected-version:0.3.0 version-input:0.3.0]) (push) Failing after 58s
test / test-from-working-directory-version (map[expected-version:0.5.15 working-directory:__tests__/fixtures/uv-toml-project]) (push) Failing after 27s
test / test-version-file-version (map[expected-version:0.6.17 version-file:__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt]) (push) Failing after 28s
test / test-tool-versions-python-version (push) Failing after 24s
test / test-malformed-pyproject-file-fallback (push) Failing after 26s
test / test-activate-environment (ubuntu-latest) (push) Failing after 32s
test / test-restore-cache-dependency-glob (push) Skipped
test / test-specific-version (map[expected-version:0.3.2 version-input:0.3.2]) (push) Failing after 57s
test / test-version-file-version (map[expected-version:0.5.15 version-file:__tests__/fixtures/.tool-versions]) (push) Failing after 30s
test / test-musl (push) Failing after 27s
test / lint (push) Failing after 1m45s
test / test-setup-cache-requirements-txt (push) Failing after 25s
test / test-restore-cache-save-cache-false (push) Skipped
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 32s
test / test-cache-local-cache-disabled (push) Failing after 32s
test / test-download-from-astral-mirror-false (push) Failing after 33s
test / test-act (push) Failing after 27s
test / test-restore-python-installs (push) Skipped
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 26s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 24s
test / test-restore-cache-requirements-txt (push) Skipped
CodeQL / Analyze (TypeScript) (push) Failing after 2m9s
test / test-custom-manifest-file (push) Failing after 35s
test / test-workflow-run (push) Failing after 25s
test / test-relative-path (push) Failing after 41s
test / test-cache-python-installs (push) Failing after 34s
test / validate-typings (push) Successful in 39s
test / test-default-version (macos-14) (push) Canceled after 0s
test / test-default-version (macos-latest) (push) Canceled after 0s
test / test-default-version (windows-latest) (push) Canceled after 0s
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Canceled after 0s
test / test-tool-install (macos-14) (push) Canceled after 0s
test / test-tool-install (macos-latest) (push) Canceled after 0s
test / test-tool-install (windows-latest) (push) Canceled after 0s
test / test-python-version (macos-latest) (push) Canceled after 0s
test / test-python-version (windows-latest) (push) Canceled after 0s
test / test-activate-environment (macos-latest) (push) Canceled after 0s
test / test-activate-environment (windows-latest) (push) Canceled after 0s
test / test-activate-environment-custom-path (macos-latest) (push) Canceled after 0s
test / test-activate-environment-custom-path (windows-latest) (push) Canceled after 0s
test / test-cache-key-os-version (macos-14, macos-14) (push) Canceled after 0s
test / test-cache-key-os-version (macos-15, macos-15) (push) Canceled after 0s
test / test-cache-key-os-version (ubuntu-24.04, ubuntu-24.04) (push) Canceled after 0s
test / test-cache-key-os-version (windows-2022, windows-2022) (push) Canceled after 0s
test / test-cache-key-os-version (windows-2025, windows-2025) (push) Canceled after 0s
test / test-setup-cache (auto, windows-latest) (push) Canceled after 0s
test / test-setup-cache (false, windows-latest) (push) Canceled after 0s
test / test-restore-cache (true, windows-latest) (push) Canceled after 0s
test / test-setup-cache (true, windows-latest) (push) Canceled after 0s
test / test-restore-cache (auto, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (auto, windows-latest) (push) Canceled after 0s
test / test-restore-cache (false, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (false, windows-latest) (push) Canceled after 0s
test / test-restore-cache (true, ubuntu-latest) (push) Canceled after 0s
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Canceled after 0s
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Canceled after 0s
test / all-tests-passed (push) Canceled after 0s
Release Drafter / ✏️ Draft release (push) Canceled after 0s
Transient timeout fetching manifests have increased significantly
recently, especially with private runners.

```
Fetching manifest data from https://raw.githubusercontent.com/astral-sh/versions/main/v1/uv.ndjson ...
Error: The operation was aborted due to timeout
```

Retry transient manifest network failures up to three times with a
progressive backoff (not exponential), keeping the total wait bounded
while making setup resilient to short network blips.

Co-authored-by: Raymond <arguile-@users.noreply.github.com>
2026-08-13 18:34:10 +02:00
ae3b92d1bd docs: update version references to v10.0.0 (#1014)
test / test-latest-version (>=0.8) (push) Failing after 43s
test / test-specific-version (map[expected-version:0.3.0 version-input:0.3.0]) (push) Failing after 49s
test / test-latest-version (latest) (push) Failing after 56s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3]) (push) Failing after 58s
test / test-specific-version (map[expected-version:0.4.30 version-input:>=0.4.25,<0.5]) (push) Failing after 59s
test / test-specific-version (map[expected-version:0.1.0 resolution-strategy:lowest version-input:>=0.1.0,<0.2]) (push) Failing after 1m2s
test / test-uv-no-modify-path (push) Failing after 1m4s
test / test-version-file-version (map[expected-version:0.5.15 version-file:__tests__/fixtures/.tool-versions]) (push) Failing after 27s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25,<0.5]) (push) Failing after 43s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25]) (push) Failing after 46s
test / test-specific-version (map[expected-version:0.1.45 resolution-strategy:highest version-input:>=0.1,<0.2]) (push) Failing after 54s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3.x]) (push) Failing after 58s
test / test-default-version (ubuntu-latest) (push) Failing after 1m0s
test / test-specific-version (map[expected-version:0.3.2 version-input:0.3.2]) (push) Failing after 1m1s
test / test-from-working-directory-version (map[expected-version:0.5.14 working-directory:__tests__/fixtures/pyproject-toml-project]) (push) Failing after 1m3s
test / test-from-working-directory-version (map[expected-version:0.5.15 working-directory:__tests__/fixtures/uv-toml-project]) (push) Failing after 25s
test / test-version-file-version (map[expected-version:0.6.17 version-file:__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt]) (push) Failing after 27s
test / test-version-file-version (map[expected-version:0.8.3 version-file:__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt]) (push) Failing after 27s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 29s
test / test-with-explicit-token (push) Failing after 29s
test / test-uvx (push) Failing after 31s
test / test-python-version (ubuntu-latest) (push) Failing after 31s
test / test-activate-environment (ubuntu-latest) (push) Failing after 34s
test / test-tool-versions-python-version (push) Failing after 22s
test / test-activate-environment-custom-path (ubuntu-latest) (push) Failing after 29s
test / test-activate-environment-no-project (push) Failing after 35s
test / test-restore-cache-requirements-txt (push) Skipped
test / test-cache-key-os-version (ubuntu-22.04, ubuntu-22.04) (push) Failing after 42s
test / test-setup-cache-dependency-glob (push) Failing after 30s
test / test-setup-cache-restore-cache-false (push) Failing after 30s
test / test-restore-cache-restore-cache-false (push) Skipped
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 32s
test / test-cache-local-cache-disabled (push) Failing after 33s
test / test-cache-local-cache-disabled-but-explicit-path (push) Failing after 33s
test / test-custom-manifest-file (push) Failing after 32s
test / test-cache-prune-force (push) Failing after 33s
test / test-absolute-path (push) Failing after 38s
test / test-relative-path (push) Failing after 40s
test / test-cache-python-missing-managed-install-dir (push) Failing after 32s
test / test-act (push) Failing after 28s
test / test-cache-dir-from-file (push) Failing after 38s
test / test-malformed-pyproject-file-fallback (push) Failing after 25s
test / test-tool-install (ubuntu-latest) (push) Failing after 31s
test / test-musl (push) Failing after 26s
test / test-debian-unstable (push) Failing after 31s
CodeQL / Analyze (TypeScript) (push) Failing after 2m11s
test / test-download-from-astral-mirror-false (push) Failing after 31s
test / test-no-python-version (push) Failing after 38s
test / test-python-install-dir (map[expected-python-dir:/home/runner/work/_temp/uv-python-dir os:ubuntu-latest]) (push) Failing after 32s
test / test-restore-python-installs (push) Skipped
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 26s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 28s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 24s
test / test-setup-cache-requirements-txt (push) Failing after 23s
test / lint (push) Failing after 1m54s
test / test-restore-cache-dependency-glob (push) Skipped
test / test-setup-cache-save-cache-false (push) Failing after 30s
test / test-restore-cache-save-cache-false (push) Skipped
test / test-workflow-run (push) Failing after 29s
test / test-cache-python-installs (push) Failing after 36s
test / validate-typings (push) Successful in 33s
test / test-default-version (macos-14) (push) Canceled after 0s
test / test-default-version (macos-latest) (push) Canceled after 0s
test / test-default-version (windows-latest) (push) Canceled after 0s
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Canceled after 0s
test / test-tool-install (macos-14) (push) Canceled after 0s
test / test-tool-install (macos-latest) (push) Canceled after 0s
test / test-tool-install (windows-latest) (push) Canceled after 0s
test / test-python-version (macos-latest) (push) Canceled after 0s
test / test-activate-environment-custom-path (macos-latest) (push) Canceled after 0s
test / test-activate-environment-custom-path (windows-latest) (push) Canceled after 0s
test / test-cache-key-os-version (macos-15, macos-15) (push) Canceled after 0s
test / test-cache-key-os-version (ubuntu-24.04, ubuntu-24.04) (push) Canceled after 0s
test / test-cache-key-os-version (windows-2025, windows-2025) (push) Canceled after 0s
test / test-setup-cache (auto, windows-latest) (push) Canceled after 0s
test / test-setup-cache (false, windows-latest) (push) Canceled after 0s
test / test-restore-cache (auto, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (auto, windows-latest) (push) Canceled after 0s
test / test-restore-cache (true, windows-latest) (push) Canceled after 0s
test / test-python-version (windows-latest) (push) Canceled after 0s
test / test-activate-environment (macos-latest) (push) Canceled after 0s
test / test-activate-environment (windows-latest) (push) Canceled after 0s
test / test-cache-key-os-version (macos-14, macos-14) (push) Canceled after 0s
test / test-cache-key-os-version (windows-2022, windows-2022) (push) Canceled after 0s
test / test-setup-cache (true, windows-latest) (push) Canceled after 0s
test / test-restore-cache (false, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (false, windows-latest) (push) Canceled after 0s
test / test-restore-cache (true, ubuntu-latest) (push) Canceled after 0s
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Canceled after 0s
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Canceled after 0s
test / all-tests-passed (push) Canceled after 0s
Release Drafter / ✏️ Draft release (push) Canceled after 0s
Update `uses: astral-sh/setup-uv@...` references in documentation to
`ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0`.

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-08-12 16:22:43 +02:00
10 changed files with 213 additions and 48 deletions
+9 -9
View File
@@ -26,7 +26,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
```
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
@@ -42,7 +42,7 @@ Have a look under [Advanced Configuration](#advanced-configuration) for detailed
```yaml
- name: Install uv with all available options
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
# The version of uv to install, e.g., "0.5.0", "latest", or "latest-known" (default: searches for version in config files, then latest)
version: ""
@@ -156,7 +156,7 @@ python 3.13
```
```yaml
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version-file: ".tool-versions"
```
@@ -167,7 +167,7 @@ a warning.
```yaml
- name: Install the latest version of uv and set the python version to 3.13t
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
python-version: 3.13t
- run: uv pip install --python=3.13t pip
@@ -185,7 +185,7 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Test with python ${{ matrix.python-version }}
@@ -202,7 +202,7 @@ It also controls where [the venv gets created](#activate-environment), unless `v
```yaml
- name: Install uv based on the config files in the working-directory
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
working-directory: my/subproject/dir
```
@@ -244,7 +244,7 @@ For example:
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the latest version of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
- name: Test
@@ -256,7 +256,7 @@ To install a specific version of Python, use
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
- name: Install Python 3.12
@@ -275,7 +275,7 @@ output:
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
```
+41 -1
View File
@@ -1,4 +1,11 @@
import { beforeEach, describe, expect, it, jest } from "@jest/globals";
import {
afterEach,
beforeEach,
describe,
expect,
it,
jest,
} from "@jest/globals";
// biome-ignore lint/suspicious/noExplicitAny: Mock requires flexible typing in tests.
const mockFetch = jest.fn<any>();
@@ -13,6 +20,7 @@ jest.unstable_mockModule("../../src/utils/fetch", () => ({
}));
const {
MANIFEST_FETCH_ATTEMPTS,
clearManifestCache,
fetchManifest,
getAllVersions,
@@ -73,6 +81,10 @@ describe("manifest", () => {
mockFetch.mockReset();
});
afterEach(() => {
jest.useRealTimers();
});
describe("fetchManifest", () => {
it("fetches and parses manifest data", async () => {
mockFetch.mockResolvedValue(
@@ -86,6 +98,34 @@ describe("manifest", () => {
expect(versions[1]?.version).toBe("0.9.25");
});
it("retries network failures", async () => {
jest.useFakeTimers();
mockFetch
.mockRejectedValueOnce(new Error("request timed out"))
.mockResolvedValueOnce(
createMockResponse(true, 200, "OK", sampleManifestResponse),
);
const result = fetchManifest();
await jest.runAllTimersAsync();
await expect(result).resolves.toHaveLength(2);
expect(mockFetch).toHaveBeenCalledTimes(2);
});
it("stops after the configured number of network failures", async () => {
jest.useFakeTimers();
mockFetch.mockRejectedValue(new Error("request timed out"));
const result = expect(fetchManifest()).rejects.toThrow(
"request timed out",
);
await jest.runAllTimersAsync();
await result;
expect(mockFetch).toHaveBeenCalledTimes(MANIFEST_FETCH_ATTEMPTS);
});
it("throws on a failed fetch", async () => {
mockFetch.mockResolvedValue(
createMockResponse(false, 500, "Internal Server Error", ""),
Generated Vendored
+37 -2
View File
@@ -94508,6 +94508,24 @@ var fs10 = __toESM(require("node:fs"), 1);
// src/download/checksum/known-checksums.ts
var KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.12.4": "99a913b606194867b43086404412c1afe079547fee72ecfb6af7e7b0dd54b0c6",
"aarch64-pc-windows-msvc-0.12.4": "3290abffee78c30e3113f5113e26684fd057287e89124a588dcdcdd6ceec0fea",
"aarch64-unknown-linux-gnu-0.12.4": "49d881b3403187e1f1789720881e77e4251ad4259d86c4844862657d2a35d13f",
"aarch64-unknown-linux-musl-0.12.4": "04ed16e895b08065720e3d06cde722f0d406b63d116247d5e7776525c41f4972",
"arm-unknown-linux-musleabihf-0.12.4": "9657ea47619bae9097e92a942694c3bbead7bf37c5ccffa6a0f8b3f08a947dba",
"armv7-unknown-linux-gnueabihf-0.12.4": "fd9d223afc79a4d116d48269ea8cdc00cdeb0637d028843910650abc037e7c4f",
"armv7-unknown-linux-musleabihf-0.12.4": "c61f3c109fcb0c9cac2a3c232d50ccd70c422a5d4dae44dab007bdf5c1e64f0d",
"i686-pc-windows-msvc-0.12.4": "06a4948b908ce93af14c140158e15b5247ae6c8f15db50f3e4c6335bfd08b3fd",
"i686-unknown-linux-gnu-0.12.4": "bcf9e594c0867f9bfe91b7979cdac38a86bb9f7136ceba259e727af912127f23",
"i686-unknown-linux-musl-0.12.4": "d4c95044a507046f1ce9efdd00fb6873432a7d582a29d22febad26d92551586a",
"powerpc64le-unknown-linux-gnu-0.12.4": "6028a1744a7c07d789f21cf4c1574bb4bfe40f2980ac411af5bcbaeac32b0094",
"riscv64gc-unknown-linux-gnu-0.12.4": "dca9b15d76b5547987fc6b08fc1ea14e49773d9434b52825c68397c53896a139",
"riscv64gc-unknown-linux-musl-0.12.4": "cc481ddf7f9d09491b83defa9a221e1410f7a4b1ea160687e201815ba1d91a7a",
"s390x-unknown-linux-gnu-0.12.4": "9c6eea6ed43d8753e7eb26489a73ac060012e1a2485992955dd82a3b10b47acb",
"x86_64-apple-darwin-0.12.4": "e603f1eb634ca97a2a125539b983891f53235e901511ed10c32c08c86e253ecd",
"x86_64-pc-windows-msvc-0.12.4": "4f3b7d63cd81fca0da5a655d973d20affca89ce6e5f9a29fd0183cc4204a7639",
"x86_64-unknown-linux-gnu-0.12.4": "c8c60f47e6f88d18dbf6f33d7279fb1fbf7ae76631768152cf5578c3d65729b4",
"x86_64-unknown-linux-musl-0.12.4": "7aef04898775585d636424e52053e5328f2b1779175d5cb47665ff9d7524e8e7",
"aarch64-apple-darwin-0.12.3": "546f7f8a6c70ff13a3a9d2bc958db3427298cebf3e0cb756f9177133b7068843",
"aarch64-pc-windows-msvc-0.12.3": "4343217d668727b8a8eb5cad92389a1d2eeead93c89940d1b955ba1bb15462eb",
"aarch64-unknown-linux-gnu-0.12.3": "bb66cb52e7b1823aed1183630d8d8e5c958840d584a4c55ec10a4cfc168dcca2",
@@ -99724,6 +99742,7 @@ function formatVariants(entries) {
// src/download/manifest.ts
var cachedManifestData = /* @__PURE__ */ new Map();
var MANIFEST_FETCH_ATTEMPTS = 3;
async function fetchManifest(manifestUrl = VERSIONS_MANIFEST_URL) {
const cachedManifest = cachedManifestData.get(manifestUrl);
if (cachedManifest?.complete === true) {
@@ -99802,8 +99821,24 @@ async function getArtifact(version3, arch3, platform2, manifestUrl = VERSIONS_MA
};
}
async function fetchManifestResponse(manifestUrl) {
info2(`Fetching manifest data from ${manifestUrl} ...`);
const response = await fetch(manifestUrl, {});
let response;
for (let attempt = 1; attempt <= MANIFEST_FETCH_ATTEMPTS; attempt++) {
info2(`Fetching manifest data from ${manifestUrl} ...`);
try {
response = await fetch(manifestUrl, {});
break;
} catch (error2) {
if (attempt >= MANIFEST_FETCH_ATTEMPTS) {
throw error2;
}
const delayMs = 1e3 * 2 ** (attempt - 1);
info2(`Manifest fetch failed; retrying in ${delayMs}ms ...`);
await new Promise((resolve3) => setTimeout(resolve3, delayMs));
}
}
if (response === void 0) {
throw new Error("Manifest fetch attempts exhausted.");
}
if (!response.ok) {
throw new Error(
`Failed to fetch manifest data: ${response.status} ${response.statusText}`
+37 -2
View File
@@ -47182,6 +47182,24 @@ var semver = __toESM(require_semver(), 1);
// src/download/checksum/known-checksums.ts
var KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.12.4": "99a913b606194867b43086404412c1afe079547fee72ecfb6af7e7b0dd54b0c6",
"aarch64-pc-windows-msvc-0.12.4": "3290abffee78c30e3113f5113e26684fd057287e89124a588dcdcdd6ceec0fea",
"aarch64-unknown-linux-gnu-0.12.4": "49d881b3403187e1f1789720881e77e4251ad4259d86c4844862657d2a35d13f",
"aarch64-unknown-linux-musl-0.12.4": "04ed16e895b08065720e3d06cde722f0d406b63d116247d5e7776525c41f4972",
"arm-unknown-linux-musleabihf-0.12.4": "9657ea47619bae9097e92a942694c3bbead7bf37c5ccffa6a0f8b3f08a947dba",
"armv7-unknown-linux-gnueabihf-0.12.4": "fd9d223afc79a4d116d48269ea8cdc00cdeb0637d028843910650abc037e7c4f",
"armv7-unknown-linux-musleabihf-0.12.4": "c61f3c109fcb0c9cac2a3c232d50ccd70c422a5d4dae44dab007bdf5c1e64f0d",
"i686-pc-windows-msvc-0.12.4": "06a4948b908ce93af14c140158e15b5247ae6c8f15db50f3e4c6335bfd08b3fd",
"i686-unknown-linux-gnu-0.12.4": "bcf9e594c0867f9bfe91b7979cdac38a86bb9f7136ceba259e727af912127f23",
"i686-unknown-linux-musl-0.12.4": "d4c95044a507046f1ce9efdd00fb6873432a7d582a29d22febad26d92551586a",
"powerpc64le-unknown-linux-gnu-0.12.4": "6028a1744a7c07d789f21cf4c1574bb4bfe40f2980ac411af5bcbaeac32b0094",
"riscv64gc-unknown-linux-gnu-0.12.4": "dca9b15d76b5547987fc6b08fc1ea14e49773d9434b52825c68397c53896a139",
"riscv64gc-unknown-linux-musl-0.12.4": "cc481ddf7f9d09491b83defa9a221e1410f7a4b1ea160687e201815ba1d91a7a",
"s390x-unknown-linux-gnu-0.12.4": "9c6eea6ed43d8753e7eb26489a73ac060012e1a2485992955dd82a3b10b47acb",
"x86_64-apple-darwin-0.12.4": "e603f1eb634ca97a2a125539b983891f53235e901511ed10c32c08c86e253ecd",
"x86_64-pc-windows-msvc-0.12.4": "4f3b7d63cd81fca0da5a655d973d20affca89ce6e5f9a29fd0183cc4204a7639",
"x86_64-unknown-linux-gnu-0.12.4": "c8c60f47e6f88d18dbf6f33d7279fb1fbf7ae76631768152cf5578c3d65729b4",
"x86_64-unknown-linux-musl-0.12.4": "7aef04898775585d636424e52053e5328f2b1779175d5cb47665ff9d7524e8e7",
"aarch64-apple-darwin-0.12.3": "546f7f8a6c70ff13a3a9d2bc958db3427298cebf3e0cb756f9177133b7068843",
"aarch64-pc-windows-msvc-0.12.3": "4343217d668727b8a8eb5cad92389a1d2eeead93c89940d1b955ba1bb15462eb",
"aarch64-unknown-linux-gnu-0.12.3": "bb66cb52e7b1823aed1183630d8d8e5c958840d584a4c55ec10a4cfc168dcca2",
@@ -52390,6 +52408,7 @@ function info2(msg) {
// src/download/manifest.ts
var cachedManifestData = /* @__PURE__ */ new Map();
var MANIFEST_FETCH_ATTEMPTS = 3;
async function fetchManifest(manifestUrl = VERSIONS_MANIFEST_URL) {
const cachedManifest = cachedManifestData.get(manifestUrl);
if (cachedManifest?.complete === true) {
@@ -52430,8 +52449,24 @@ async function getLatestVersion(manifestUrl = VERSIONS_MANIFEST_URL) {
return latestVersion;
}
async function fetchManifestResponse(manifestUrl) {
info2(`Fetching manifest data from ${manifestUrl} ...`);
const response = await fetch(manifestUrl, {});
let response;
for (let attempt = 1; attempt <= MANIFEST_FETCH_ATTEMPTS; attempt++) {
info2(`Fetching manifest data from ${manifestUrl} ...`);
try {
response = await fetch(manifestUrl, {});
break;
} catch (error2) {
if (attempt >= MANIFEST_FETCH_ATTEMPTS) {
throw error2;
}
const delayMs = 1e3 * 2 ** (attempt - 1);
info2(`Manifest fetch failed; retrying in ${delayMs}ms ...`);
await new Promise((resolve) => setTimeout(resolve, delayMs));
}
}
if (response === void 0) {
throw new Error("Manifest fetch attempts exhausted.");
}
if (!response.ok) {
throw new Error(
`Failed to fetch manifest data: ${response.status} ${response.statusText}`
+9 -9
View File
@@ -6,7 +6,7 @@ This document covers advanced options for configuring which version of uv to ins
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: "latest"
```
@@ -19,7 +19,7 @@ When `manifest-file` is set, `latest-known` still selects a version from setup-u
```yaml
- name: Install the latest version of uv known to setup-uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: "latest-known"
```
@@ -28,7 +28,7 @@ When `manifest-file` is set, `latest-known` still selects a version from setup-u
```yaml
- name: Install a specific version of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: "0.4.4"
```
@@ -41,21 +41,21 @@ to install the latest version that satisfies the range.
```yaml
- name: Install a semver range of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: ">=0.4.0"
```
```yaml
- name: Pinning a minor version of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: "0.4.x"
```
```yaml
- name: Install a pep440-specifier-satisfying version of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: ">=0.4.25,<0.5"
```
@@ -67,7 +67,7 @@ You can change this behavior using the `resolution-strategy` input:
```yaml
- name: Install the lowest compatible version of uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: ">=0.4.0"
resolution-strategy: "lowest"
@@ -92,7 +92,7 @@ as `UV_PYTHON`. Only a single Python version is supported; multiple fallback ver
```yaml
- name: Install uv based on the version defined in pyproject.toml
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version-file: "pyproject.toml"
```
@@ -103,7 +103,7 @@ silently picking up a newer uv until the lockfile is updated.
```yaml
- name: Install uv based on the version locked in uv.lock
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version-file: "uv.lock"
```
+12 -12
View File
@@ -23,7 +23,7 @@ The computed cache key is available as the `cache-key` output:
```yaml
- name: Setup uv
id: setup-uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
- name: Print cache key
@@ -53,7 +53,7 @@ You can optionally define a custom cache key suffix.
```yaml
- name: Enable caching and define a custom cache key suffix
id: setup-uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
cache-suffix: "optional-suffix"
@@ -92,7 +92,7 @@ changes. If you use relative paths, they are relative to the working directory.
```yaml
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
@@ -100,7 +100,7 @@ changes. If you use relative paths, they are relative to the working directory.
```yaml
- name: Define a list of cache dependency globs
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
cache-dependency-glob: |
@@ -110,7 +110,7 @@ changes. If you use relative paths, they are relative to the working directory.
```yaml
- name: Define an absolute cache dependency glob
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
@@ -118,7 +118,7 @@ changes. If you use relative paths, they are relative to the working directory.
```yaml
- name: Never invalidate the cache
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
cache-dependency-glob: ""
@@ -131,7 +131,7 @@ By default, the cache will be restored.
```yaml
- name: Don't restore an existing cache
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
restore-cache: false
@@ -145,7 +145,7 @@ By default, the cache will be saved.
```yaml
- name: Don't save the cache after the run
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
save-cache: false
@@ -171,7 +171,7 @@ It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\setup-uv-cache` on
```yaml
- name: Define a custom uv cache path
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
cache-local-path: "/path/to/cache"
```
@@ -188,7 +188,7 @@ If you want to prune the cache before saving it, enable cache pruning with the `
```yaml
- name: Prune the cache before saving it
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
prune-cache: true
@@ -207,7 +207,7 @@ To force managed Python installs, set `UV_PYTHON_PREFERENCE=only-managed`.
```yaml
- name: Cache Python installs
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
cache-python: true
@@ -225,7 +225,7 @@ If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
```yaml
- name: Ignore nothing to cache
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
enable-cache: true
ignore-nothing-to-cache: true
+3 -3
View File
@@ -10,7 +10,7 @@ are automatically verified by this action. The sha256 hashes can be found on the
```yaml
- name: Install a specific version and validate the checksum
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: "0.3.1"
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
@@ -39,7 +39,7 @@ The `archive_format` field is currently ignored.
```yaml
- name: Use a custom manifest file
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
manifest-file: "https://example.com/my-custom-manifest.ndjson"
```
@@ -58,7 +58,7 @@ You can disable this by setting the `add-problem-matchers` input to `false`.
```yaml
- name: Install the latest version of uv without problem matchers
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
add-problem-matchers: false
```
+8 -8
View File
@@ -9,7 +9,7 @@ This allows directly using it in later steps:
```yaml
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
activate-environment: true
- run: uv pip install pip
@@ -20,7 +20,7 @@ By default, the venv is created at `.venv` inside the `working-directory`.
You can customize the venv location with `venv-path`, for example to place it in the runner temp directory:
```yaml
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
activate-environment: true
venv-path: ${{ runner.temp }}/custom-venv
@@ -51,7 +51,7 @@ are not sufficient, you can provide a custom GitHub token with the necessary per
```yaml
- name: Install the latest version of uv with a custom GitHub token
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```
@@ -69,7 +69,7 @@ input:
```yaml
- name: Install the latest version of uv with a custom tool dir
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
tool-dir: "/path/to/tool/dir"
```
@@ -88,7 +88,7 @@ If you want to change this behaviour (especially on self-hosted runners) you can
```yaml
- name: Install the latest version of uv with a custom tool bin dir
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
tool-bin-dir: "/path/to/tool-bin/dir"
```
@@ -105,7 +105,7 @@ This action supports expanding the `~` character to the user's home directory fo
```yaml
- name: Expand the tilde character
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
cache-local-path: "~/path/to/cache"
tool-dir: "~/path/to/tool/dir"
@@ -122,7 +122,7 @@ If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
```yaml
- name: Ignore empty workdir
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
ignore-empty-workdir: true
```
@@ -146,7 +146,7 @@ This action sets several environment variables that influence uv's behavior and
```yaml
- name: Example using environment variables
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
python-version: "3.12"
tool-dir: "/custom/tool/dir"
+36
View File
@@ -1,5 +1,41 @@
// AUTOGENERATED_DO_NOT_EDIT
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
"aarch64-apple-darwin-0.12.4":
"99a913b606194867b43086404412c1afe079547fee72ecfb6af7e7b0dd54b0c6",
"aarch64-pc-windows-msvc-0.12.4":
"3290abffee78c30e3113f5113e26684fd057287e89124a588dcdcdd6ceec0fea",
"aarch64-unknown-linux-gnu-0.12.4":
"49d881b3403187e1f1789720881e77e4251ad4259d86c4844862657d2a35d13f",
"aarch64-unknown-linux-musl-0.12.4":
"04ed16e895b08065720e3d06cde722f0d406b63d116247d5e7776525c41f4972",
"arm-unknown-linux-musleabihf-0.12.4":
"9657ea47619bae9097e92a942694c3bbead7bf37c5ccffa6a0f8b3f08a947dba",
"armv7-unknown-linux-gnueabihf-0.12.4":
"fd9d223afc79a4d116d48269ea8cdc00cdeb0637d028843910650abc037e7c4f",
"armv7-unknown-linux-musleabihf-0.12.4":
"c61f3c109fcb0c9cac2a3c232d50ccd70c422a5d4dae44dab007bdf5c1e64f0d",
"i686-pc-windows-msvc-0.12.4":
"06a4948b908ce93af14c140158e15b5247ae6c8f15db50f3e4c6335bfd08b3fd",
"i686-unknown-linux-gnu-0.12.4":
"bcf9e594c0867f9bfe91b7979cdac38a86bb9f7136ceba259e727af912127f23",
"i686-unknown-linux-musl-0.12.4":
"d4c95044a507046f1ce9efdd00fb6873432a7d582a29d22febad26d92551586a",
"powerpc64le-unknown-linux-gnu-0.12.4":
"6028a1744a7c07d789f21cf4c1574bb4bfe40f2980ac411af5bcbaeac32b0094",
"riscv64gc-unknown-linux-gnu-0.12.4":
"dca9b15d76b5547987fc6b08fc1ea14e49773d9434b52825c68397c53896a139",
"riscv64gc-unknown-linux-musl-0.12.4":
"cc481ddf7f9d09491b83defa9a221e1410f7a4b1ea160687e201815ba1d91a7a",
"s390x-unknown-linux-gnu-0.12.4":
"9c6eea6ed43d8753e7eb26489a73ac060012e1a2485992955dd82a3b10b47acb",
"x86_64-apple-darwin-0.12.4":
"e603f1eb634ca97a2a125539b983891f53235e901511ed10c32c08c86e253ecd",
"x86_64-pc-windows-msvc-0.12.4":
"4f3b7d63cd81fca0da5a655d973d20affca89ce6e5f9a29fd0183cc4204a7639",
"x86_64-unknown-linux-gnu-0.12.4":
"c8c60f47e6f88d18dbf6f33d7279fb1fbf7ae76631768152cf5578c3d65729b4",
"x86_64-unknown-linux-musl-0.12.4":
"7aef04898775585d636424e52053e5328f2b1779175d5cb47665ff9d7524e8e7",
"aarch64-apple-darwin-0.12.3":
"546f7f8a6c70ff13a3a9d2bc958db3427298cebf3e0cb756f9177133b7068843",
"aarch64-pc-windows-msvc-0.12.3":
+21 -2
View File
@@ -31,6 +31,7 @@ interface CachedManifest {
}
const cachedManifestData = new Map<string, CachedManifest>();
export const MANIFEST_FETCH_ATTEMPTS = 3;
export async function fetchManifest(
manifestUrl: string = VERSIONS_MANIFEST_URL,
@@ -166,8 +167,26 @@ export function clearManifestCache(manifestUrl?: string): void {
}
async function fetchManifestResponse(manifestUrl: string) {
log.info(`Fetching manifest data from ${manifestUrl} ...`);
const response = await fetch(manifestUrl, {});
let response: Awaited<ReturnType<typeof fetch>> | undefined;
for (let attempt = 1; attempt <= MANIFEST_FETCH_ATTEMPTS; attempt++) {
log.info(`Fetching manifest data from ${manifestUrl} ...`);
try {
response = await fetch(manifestUrl, {});
break;
} catch (error) {
if (attempt >= MANIFEST_FETCH_ATTEMPTS) {
throw error;
}
const delayMs = 1_000 * 2 ** (attempt - 1);
log.info(`Manifest fetch failed; retrying in ${delayMs}ms ...`);
await new Promise((resolve) => setTimeout(resolve, delayMs));
}
}
if (response === undefined) {
throw new Error("Manifest fetch attempts exhausted.");
}
if (!response.ok) {
throw new Error(
`Failed to fetch manifest data: ${response.status} ${response.statusText}`,