Files
setup-uv/__tests__/helpers/setup-inputs.ts
T
Kevin StillhammerandAmp 36300bab3f Respect the mirror setting when selecting the version manifest (#1164)
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>
2026-12-02 11:40:15 +01:00

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,
};
}