mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-12-18 02:17:06 +00:00
Compare commits
3 Commits
use-uv-fro
...
debug-wind
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a0f676ea8 | ||
|
|
451c40c4e1 | ||
|
|
d45ee42618 |
6
.github/workflows/test-windows.yml
vendored
6
.github/workflows/test-windows.yml
vendored
@@ -23,5 +23,7 @@ jobs:
|
||||
}
|
||||
- name: Setup uv
|
||||
uses: ./
|
||||
- run: uv sync
|
||||
working-directory: __tests__\fixtures\uv-project
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- run: ls
|
||||
- run: uv pip install -r __tests__/fixtures/requirements-txt-project/requirements.txt
|
||||
|
||||
20
dist/save-cache/index.js
generated
vendored
20
dist/save-cache/index.js
generated
vendored
@@ -91671,7 +91671,6 @@ const exec = __importStar(__nccwpck_require__(5236));
|
||||
const fs = __importStar(__nccwpck_require__(3024));
|
||||
const restore_cache_1 = __nccwpck_require__(5391);
|
||||
const inputs_1 = __nccwpck_require__(9612);
|
||||
const constants_1 = __nccwpck_require__(6156);
|
||||
async function run() {
|
||||
try {
|
||||
if (inputs_1.enableCache) {
|
||||
@@ -91723,10 +91722,8 @@ async function saveCache() {
|
||||
}
|
||||
}
|
||||
async function pruneCache() {
|
||||
const uvDir = core.getState(constants_1.STATE_CACHED_UV_DIR);
|
||||
const options = {
|
||||
silent: false,
|
||||
env: { PATH: uvDir },
|
||||
silent: !core.isDebug(),
|
||||
};
|
||||
const execArgs = ["cache", "prune", "--ci"];
|
||||
core.info("Pruning cache...");
|
||||
@@ -91735,21 +91732,6 @@ async function pruneCache() {
|
||||
run();
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6156:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.STATE_CACHED_UV_DIR = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.REPO = "uv";
|
||||
exports.OWNER = "astral-sh";
|
||||
exports.TOOL_CACHE_NAME = "uv";
|
||||
exports.STATE_CACHED_UV_DIR = "cached-uv-dir";
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9612:
|
||||
|
||||
5
dist/setup/index.js
generated
vendored
5
dist/setup/index.js
generated
vendored
@@ -95331,7 +95331,6 @@ const inputs_1 = __nccwpck_require__(9612);
|
||||
const exec = __importStar(__nccwpck_require__(5236));
|
||||
const node_fs_1 = __importDefault(__nccwpck_require__(3024));
|
||||
const pyproject_1 = __nccwpck_require__(3929);
|
||||
const constants_1 = __nccwpck_require__(6156);
|
||||
async function run() {
|
||||
const platform = (0, platforms_1.getPlatform)();
|
||||
const arch = (0, platforms_1.getArch)();
|
||||
@@ -95343,7 +95342,6 @@ async function run() {
|
||||
throw new Error(`Unsupported architecture: ${process.arch}`);
|
||||
}
|
||||
const setupResult = await setupUv(platform, arch, inputs_1.checkSum, inputs_1.githubToken);
|
||||
core.saveState(constants_1.STATE_CACHED_UV_DIR, setupResult.uvDir);
|
||||
addUvToPath(setupResult.uvDir);
|
||||
addToolBinToPath();
|
||||
setToolDir();
|
||||
@@ -95465,11 +95463,10 @@ run();
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.STATE_CACHED_UV_DIR = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.REPO = "uv";
|
||||
exports.OWNER = "astral-sh";
|
||||
exports.TOOL_CACHE_NAME = "uv";
|
||||
exports.STATE_CACHED_UV_DIR = "cached-uv-dir";
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
3
dist/update-known-checksums/index.js
generated
vendored
3
dist/update-known-checksums/index.js
generated
vendored
@@ -30859,11 +30859,10 @@ run();
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.STATE_CACHED_UV_DIR = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.REPO = "uv";
|
||||
exports.OWNER = "astral-sh";
|
||||
exports.TOOL_CACHE_NAME = "uv";
|
||||
exports.STATE_CACHED_UV_DIR = "cached-uv-dir";
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
ignoreNothingToCache,
|
||||
pruneCache as shouldPruneCache,
|
||||
} from "./utils/inputs";
|
||||
import { STATE_CACHED_UV_DIR } from "./utils/constants";
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
@@ -73,10 +72,8 @@ async function saveCache(): Promise<void> {
|
||||
}
|
||||
|
||||
async function pruneCache(): Promise<void> {
|
||||
const uvDir = core.getState(STATE_CACHED_UV_DIR);
|
||||
const options: exec.ExecOptions = {
|
||||
silent: false,
|
||||
env: { PATH: uvDir },
|
||||
silent: !core.isDebug(),
|
||||
};
|
||||
const execArgs = ["cache", "prune", "--ci"];
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ import {
|
||||
import * as exec from "@actions/exec";
|
||||
import fs from "node:fs";
|
||||
import { getUvVersionFromConfigFile } from "./utils/pyproject";
|
||||
import { STATE_CACHED_UV_DIR } from "./utils/constants";
|
||||
|
||||
async function run(): Promise<void> {
|
||||
const platform = getPlatform();
|
||||
@@ -43,7 +42,6 @@ async function run(): Promise<void> {
|
||||
}
|
||||
const setupResult = await setupUv(platform, arch, checkSum, githubToken);
|
||||
|
||||
core.saveState(STATE_CACHED_UV_DIR, setupResult.uvDir);
|
||||
addUvToPath(setupResult.uvDir);
|
||||
addToolBinToPath();
|
||||
setToolDir();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export const REPO = "uv";
|
||||
export const OWNER = "astral-sh";
|
||||
export const TOOL_CACHE_NAME = "uv";
|
||||
export const STATE_CACHED_UV_DIR = "cached-uv-dir";
|
||||
|
||||
Reference in New Issue
Block a user