mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-04-04 14:45:19 -04:00
Add uv-path and uvx-path output (#341)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / lint (push) Has been cancelled
test / test-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (ubuntu-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-specific-version (0.3) (push) Has been cancelled
test / test-specific-version (0.3.0) (push) Has been cancelled
test / test-specific-version (0.3.2) (push) Has been cancelled
test / test-specific-version (0.3.x) (push) Has been cancelled
test / test-specific-version (>=0.3.0) (push) Has been cancelled
test / test-semver-range (push) Has been cancelled
test / test-pyproject-file-version (push) Has been cancelled
test / test-malformed-pyproject-file-fallback (push) Has been cancelled
test / test-uv-file-version (push) Has been cancelled
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-with-explicit-token (push) Has been cancelled
test / test-uvx (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tool-install (macos-latest) (push) Has been cancelled
test / test-tool-install (ubuntu-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (ubuntu-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-musl (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-setup-cache-requirements-txt (push) Has been cancelled
test / test-setup-cache-dependency-glob (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-no-python-version (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-requirements-txt (push) Has been cancelled
test / test-restore-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / lint (push) Has been cancelled
test / test-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (ubuntu-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-specific-version (0.3) (push) Has been cancelled
test / test-specific-version (0.3.0) (push) Has been cancelled
test / test-specific-version (0.3.2) (push) Has been cancelled
test / test-specific-version (0.3.x) (push) Has been cancelled
test / test-specific-version (>=0.3.0) (push) Has been cancelled
test / test-semver-range (push) Has been cancelled
test / test-pyproject-file-version (push) Has been cancelled
test / test-malformed-pyproject-file-fallback (push) Has been cancelled
test / test-uv-file-version (push) Has been cancelled
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-with-explicit-token (push) Has been cancelled
test / test-uvx (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tool-install (macos-latest) (push) Has been cancelled
test / test-tool-install (ubuntu-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (ubuntu-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-musl (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-setup-cache-requirements-txt (push) Has been cancelled
test / test-setup-cache-dependency-glob (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-no-python-version (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-requirements-txt (push) Has been cancelled
test / test-restore-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Closes: #338
This commit is contained in:
parent
bf8ec1ea35
commit
22695119d7
4 changed files with 17 additions and 4 deletions
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
|
@ -41,10 +41,15 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install latest version
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
shell: bash
|
||||
- name: Check uv-path is set
|
||||
run: ${{ steps.setup-uv.outputs.uv-path }} --version
|
||||
- name: Check uvx-path is set
|
||||
run: ${{ steps.setup-uv.outputs.uvx-path }} --version
|
||||
|
||||
test-specific-version:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -57,6 +57,10 @@ inputs:
|
|||
outputs:
|
||||
uv-version:
|
||||
description: "The installed uv version. Useful when using latest."
|
||||
uv-path:
|
||||
description: "The path to the installed uv binary."
|
||||
uvx-path:
|
||||
description: "The path to the installed uvx binary."
|
||||
cache-hit:
|
||||
description: "A boolean value to indicate a cache entry was found"
|
||||
runs:
|
||||
|
|
6
dist/setup/index.js
generated
vendored
6
dist/setup/index.js
generated
vendored
|
@ -123418,7 +123418,7 @@ async function run() {
|
|||
throw new Error(`Unsupported architecture: ${process.arch}`);
|
||||
}
|
||||
const setupResult = await setupUv(platform, arch, inputs_1.checkSum, inputs_1.githubToken);
|
||||
addUvToPath(setupResult.uvDir);
|
||||
addUvToPathAndOutput(setupResult.uvDir);
|
||||
addToolBinToPath();
|
||||
setToolDir();
|
||||
await setupPython();
|
||||
|
@ -123480,7 +123480,9 @@ async function determineVersion() {
|
|||
const versionFromConfigFile = (0, pyproject_1.getUvVersionFromConfigFile)(versionFile);
|
||||
return await (0, download_version_1.resolveVersion)(versionFromConfigFile || "latest", inputs_1.githubToken);
|
||||
}
|
||||
function addUvToPath(cachedPath) {
|
||||
function addUvToPathAndOutput(cachedPath) {
|
||||
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
||||
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
||||
core.addPath(cachedPath);
|
||||
core.info(`Added ${cachedPath} to the path`);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ async function run(): Promise<void> {
|
|||
}
|
||||
const setupResult = await setupUv(platform, arch, checkSum, githubToken);
|
||||
|
||||
addUvToPath(setupResult.uvDir);
|
||||
addUvToPathAndOutput(setupResult.uvDir);
|
||||
addToolBinToPath();
|
||||
setToolDir();
|
||||
await setupPython();
|
||||
|
@ -129,7 +129,9 @@ async function determineVersion(): Promise<string> {
|
|||
return await resolveVersion(versionFromConfigFile || "latest", githubToken);
|
||||
}
|
||||
|
||||
function addUvToPath(cachedPath: string): void {
|
||||
function addUvToPathAndOutput(cachedPath: string): void {
|
||||
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
||||
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
||||
core.addPath(cachedPath);
|
||||
core.info(`Added ${cachedPath} to the path`);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue