mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-06-30 01:30:44 +00:00
feat: add download-from-astral-mirror input
Add a new boolean input (default: true) that controls whether uv is downloaded from the Astral mirror or directly from GitHub Releases. When set to false, the mirror rewrite is skipped entirely.
This commit is contained in:
parent
ddb93f091f
commit
4fa8fca033
10 changed files with 66 additions and 4 deletions
|
|
@ -376,6 +376,32 @@ describe("download-version", () => {
|
|||
"0.9.26",
|
||||
);
|
||||
});
|
||||
|
||||
it("skips the Astral mirror when downloadFromAstralMirror is false", async () => {
|
||||
mockGetArtifact.mockResolvedValue({
|
||||
archiveFormat: "tar.gz",
|
||||
checksum: "abc123",
|
||||
downloadUrl:
|
||||
"https://github.com/astral-sh/uv/releases/download/0.9.26/uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
});
|
||||
|
||||
await downloadVersion(
|
||||
"unknown-linux-gnu",
|
||||
"x86_64",
|
||||
"0.9.26",
|
||||
undefined,
|
||||
"token",
|
||||
undefined,
|
||||
false,
|
||||
);
|
||||
|
||||
expect(mockDownloadTool).toHaveBeenCalledWith(
|
||||
"https://github.com/astral-sh/uv/releases/download/0.9.26/uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
undefined,
|
||||
"token",
|
||||
);
|
||||
expect(mockDownloadTool).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("rewriteToMirror", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue