mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-07-07 12:11:34 +00:00
## Summary - URL-encode the Python version component before adding it to the cache key - URL-encode the user-provided cache suffix for the same reason - Add cache key tests for Python ranges, comma-containing suffixes, and unchanged simple inputs Fixes #914 Refs: pi-session 019f3164-85e7-7817-bffd-501d89b3a1fd ## Tests - npm run all
37 lines
926 B
TypeScript
37 lines
926 B
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,
|
|
githubToken: "",
|
|
ignoreEmptyWorkdir: false,
|
|
ignoreNothingToCache: false,
|
|
noProject: false,
|
|
pruneCache: true,
|
|
pythonDir: "/tmp/uv-python-dir",
|
|
pythonVersion: "",
|
|
quiet: false,
|
|
resolutionStrategy: "highest",
|
|
restoreCache: false,
|
|
saveCache: true,
|
|
venvPath: "/workspace/.venv",
|
|
version: "",
|
|
versionFile: "",
|
|
workingDirectory: "/workspace",
|
|
...overrides,
|
|
};
|
|
}
|