mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-12-04 02:16:06 +00:00
Select the manifest source from the action inputs and keep version resolution separate from archive downloads. Fetch the built-in manifest directly from GitHub when the Astral mirror is disabled. Fixes: #1140 Based on the work of @Rudra-G-23 in https://github.com/astral-sh/setup-uv/pull/1152 Co-authored-by: Amp <amp@ampcode.com>
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { CacheLocalSource, type SetupInputs } from "../../src/utils/inputs";
|
|
|
|
export function createSetupInputs(
|
|
overrides: Partial<SetupInputs> = {},
|
|
): SetupInputs {
|
|
return {
|
|
activateEnvironment: false,
|
|
addProblemMatchers: false,
|
|
cacheDependencyGlob: "uv.lock",
|
|
cacheLocalPath: {
|
|
path: "/tmp/setup-uv-cache",
|
|
source: CacheLocalSource.Input,
|
|
},
|
|
cachePython: false,
|
|
cacheSuffix: "",
|
|
checksum: "",
|
|
downloadFromAstralMirror: false,
|
|
enableCache: true,
|
|
exportPythonArch: false,
|
|
githubToken: "",
|
|
ignoreEmptyWorkdir: false,
|
|
ignoreNothingToCache: false,
|
|
manifestSource: {
|
|
custom: false,
|
|
newestFirst: true,
|
|
url: "https://example.com/uv.ndjson",
|
|
},
|
|
noProject: false,
|
|
pruneCache: false,
|
|
pythonArch: "",
|
|
pythonDir: "/tmp/uv-python-dir",
|
|
pythonVersion: "",
|
|
quiet: false,
|
|
requireChecksums: false,
|
|
resolutionStrategy: "highest",
|
|
restoreCache: false,
|
|
saveCache: true,
|
|
venvPath: "/workspace/.venv",
|
|
version: "",
|
|
versionFile: "",
|
|
workingDirectory: "/workspace",
|
|
...overrides,
|
|
};
|
|
}
|