mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-05-01 23:15:38 +00:00
Add input no-project in combination with activate-environment (#856)
Some checks failed
CodeQL / Analyze (TypeScript) (push) Failing after 3s
test / lint (push) Failing after 2s
test / test-default-version (ubuntu-latest) (push) Failing after 2s
test / test-uv-no-modify-path (push) Failing after 2s
test / test-specific-version (map[expected-version:0.1.0 resolution-strategy:lowest version-input:>=0.1.0,<0.2]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.1.45 resolution-strategy:highest version-input:>=0.1,<0.2]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.3.0 version-input:0.3.0]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.3.2 version-input:0.3.2]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3.x]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25,<0.5]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.4.30 version-input:>=0.4.25,<0.5]) (push) Failing after 2s
test / test-latest-version (>=0.8) (push) Failing after 2s
test / test-latest-version (latest) (push) Failing after 2s
test / test-from-working-directory-version (map[expected-version:0.5.14 working-directory:__tests__/fixtures/pyproject-toml-project]) (push) Failing after 2s
test / test-from-working-directory-version (map[expected-version:0.5.15 working-directory:__tests__/fixtures/uv-toml-project]) (push) Failing after 2s
test / test-version-file-version (map[expected-version:0.5.15 version-file:__tests__/fixtures/.tool-versions]) (push) Failing after 2s
test / test-version-file-version (map[expected-version:0.6.17 version-file:__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt]) (push) Failing after 2s
test / test-version-file-version (map[expected-version:0.8.3 version-file:__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt]) (push) Failing after 2s
test / test-malformed-pyproject-file-fallback (push) Failing after 2s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 2s
test / test-with-explicit-token (push) Failing after 2s
test / test-uvx (push) Failing after 2s
test / test-tool-install (ubuntu-latest) (push) Failing after 2s
test / test-python-version (ubuntu-latest) (push) Failing after 2s
test / test-activate-environment (ubuntu-latest) (push) Failing after 2s
test / test-activate-environment-custom-path (ubuntu-latest) (push) Failing after 2s
test / test-activate-environment-no-project (push) Failing after 3s
test / test-cache-key-os-version (ubuntu-22.04, ubuntu-22.04) (push) Failing after 2s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 3s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 4s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 6s
test / test-setup-cache-requirements-txt (push) Failing after 6s
test / test-restore-cache-requirements-txt (push) Has been skipped
test / test-setup-cache-dependency-glob (push) Failing after 5s
test / test-restore-cache-dependency-glob (push) Has been skipped
test / test-setup-cache-save-cache-false (push) Failing after 5s
test / test-restore-cache-save-cache-false (push) Has been skipped
test / test-setup-cache-restore-cache-false (push) Failing after 4s
test / test-restore-cache-restore-cache-false (push) Has been skipped
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 4s
test / test-debian-unstable (push) Failing after 16s
test / test-cache-local-cache-disabled (push) Failing after 5s
test / test-musl (push) Failing after 15s
test / test-cache-local-cache-disabled-but-explicit-path (push) Failing after 5s
test / test-no-python-version (push) Failing after 5s
test / test-custom-manifest-file (push) Failing after 6s
test / test-absolute-path (push) Failing after 6s
test / test-relative-path (push) Failing after 6s
test / test-cache-prune-force (push) Failing after 6s
test / test-cache-dir-from-file (push) Failing after 6s
test / test-cache-python-missing-managed-install-dir (push) Failing after 5s
test / test-cache-python-installs (push) Failing after 5s
test / test-restore-python-installs (push) Has been skipped
test / test-python-install-dir (map[expected-python-dir:/home/runner/work/_temp/uv-python-dir os:ubuntu-latest]) (push) Failing after 5s
test / test-act (push) Failing after 6s
test / validate-typings (push) Failing after 6s
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (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-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-activate-environment-custom-path (macos-latest) (push) Has been cancelled
test / test-activate-environment-custom-path (windows-latest) (push) Has been cancelled
test / test-cache-key-os-version (macos-14, macos-14) (push) Has been cancelled
test / test-cache-key-os-version (macos-15, macos-15) (push) Has been cancelled
test / test-cache-key-os-version (ubuntu-24.04, ubuntu-24.04) (push) Has been cancelled
test / test-cache-key-os-version (windows-2022, windows-2022) (push) Has been cancelled
test / test-cache-key-os-version (windows-2025, windows-2025) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (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, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
Some checks failed
CodeQL / Analyze (TypeScript) (push) Failing after 3s
test / lint (push) Failing after 2s
test / test-default-version (ubuntu-latest) (push) Failing after 2s
test / test-uv-no-modify-path (push) Failing after 2s
test / test-specific-version (map[expected-version:0.1.0 resolution-strategy:lowest version-input:>=0.1.0,<0.2]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.1.45 resolution-strategy:highest version-input:>=0.1,<0.2]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.3.0 version-input:0.3.0]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.3.2 version-input:0.3.2]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3.x]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25,<0.5]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25]) (push) Failing after 2s
test / test-specific-version (map[expected-version:0.4.30 version-input:>=0.4.25,<0.5]) (push) Failing after 2s
test / test-latest-version (>=0.8) (push) Failing after 2s
test / test-latest-version (latest) (push) Failing after 2s
test / test-from-working-directory-version (map[expected-version:0.5.14 working-directory:__tests__/fixtures/pyproject-toml-project]) (push) Failing after 2s
test / test-from-working-directory-version (map[expected-version:0.5.15 working-directory:__tests__/fixtures/uv-toml-project]) (push) Failing after 2s
test / test-version-file-version (map[expected-version:0.5.15 version-file:__tests__/fixtures/.tool-versions]) (push) Failing after 2s
test / test-version-file-version (map[expected-version:0.6.17 version-file:__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt]) (push) Failing after 2s
test / test-version-file-version (map[expected-version:0.8.3 version-file:__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt]) (push) Failing after 2s
test / test-malformed-pyproject-file-fallback (push) Failing after 2s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 2s
test / test-with-explicit-token (push) Failing after 2s
test / test-uvx (push) Failing after 2s
test / test-tool-install (ubuntu-latest) (push) Failing after 2s
test / test-python-version (ubuntu-latest) (push) Failing after 2s
test / test-activate-environment (ubuntu-latest) (push) Failing after 2s
test / test-activate-environment-custom-path (ubuntu-latest) (push) Failing after 2s
test / test-activate-environment-no-project (push) Failing after 3s
test / test-cache-key-os-version (ubuntu-22.04, ubuntu-22.04) (push) Failing after 2s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 3s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 4s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 6s
test / test-setup-cache-requirements-txt (push) Failing after 6s
test / test-restore-cache-requirements-txt (push) Has been skipped
test / test-setup-cache-dependency-glob (push) Failing after 5s
test / test-restore-cache-dependency-glob (push) Has been skipped
test / test-setup-cache-save-cache-false (push) Failing after 5s
test / test-restore-cache-save-cache-false (push) Has been skipped
test / test-setup-cache-restore-cache-false (push) Failing after 4s
test / test-restore-cache-restore-cache-false (push) Has been skipped
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 4s
test / test-debian-unstable (push) Failing after 16s
test / test-cache-local-cache-disabled (push) Failing after 5s
test / test-musl (push) Failing after 15s
test / test-cache-local-cache-disabled-but-explicit-path (push) Failing after 5s
test / test-no-python-version (push) Failing after 5s
test / test-custom-manifest-file (push) Failing after 6s
test / test-absolute-path (push) Failing after 6s
test / test-relative-path (push) Failing after 6s
test / test-cache-prune-force (push) Failing after 6s
test / test-cache-dir-from-file (push) Failing after 6s
test / test-cache-python-missing-managed-install-dir (push) Failing after 5s
test / test-cache-python-installs (push) Failing after 5s
test / test-restore-python-installs (push) Has been skipped
test / test-python-install-dir (map[expected-python-dir:/home/runner/work/_temp/uv-python-dir os:ubuntu-latest]) (push) Failing after 5s
test / test-act (push) Failing after 6s
test / validate-typings (push) Failing after 6s
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (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-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-activate-environment-custom-path (macos-latest) (push) Has been cancelled
test / test-activate-environment-custom-path (windows-latest) (push) Has been cancelled
test / test-cache-key-os-version (macos-14, macos-14) (push) Has been cancelled
test / test-cache-key-os-version (macos-15, macos-15) (push) Has been cancelled
test / test-cache-key-os-version (ubuntu-24.04, ubuntu-24.04) (push) Has been cancelled
test / test-cache-key-os-version (windows-2022, windows-2022) (push) Has been cancelled
test / test-cache-key-os-version (windows-2025, windows-2025) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (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, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
Closes: #854
This commit is contained in:
committed by
GitHub
parent
7dd591db95
commit
b3e97d2ba1
44
.github/workflows/test.yml
vendored
44
.github/workflows/test.yml
vendored
@@ -430,6 +430,49 @@ jobs:
|
|||||||
PY
|
PY
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
test-activate-environment-no-project:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Create incompatible pyproject.toml
|
||||||
|
run: |
|
||||||
|
cat > pyproject.toml <<'EOF'
|
||||||
|
[project]
|
||||||
|
name = "test-no-project"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
|
[dependency-groups]
|
||||||
|
dev = [
|
||||||
|
"-e file:///${PROJECT_ROOT}/projects/pkg",
|
||||||
|
]
|
||||||
|
EOF
|
||||||
|
shell: bash
|
||||||
|
- name: Install latest version with no-project
|
||||||
|
id: setup-uv
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
python-version: 3.13.1t
|
||||||
|
activate-environment: true
|
||||||
|
no-project: true
|
||||||
|
- name: Verify packages can be installed
|
||||||
|
run: uv pip install pip
|
||||||
|
shell: bash
|
||||||
|
- name: Verify output venv is set
|
||||||
|
run: |
|
||||||
|
if [ -z "$UV_VENV" ]; then
|
||||||
|
echo "output venv is not set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -d "$UV_VENV" ]; then
|
||||||
|
echo "output venv not point to a directory: $UV_VENV"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
UV_VENV: ${{ steps.setup-uv.outputs.venv }}
|
||||||
|
|
||||||
test-debian-unstable:
|
test-debian-unstable:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: debian:unstable
|
container: debian:unstable
|
||||||
@@ -1057,6 +1100,7 @@ jobs:
|
|||||||
- test-python-version
|
- test-python-version
|
||||||
- test-activate-environment
|
- test-activate-environment
|
||||||
- test-activate-environment-custom-path
|
- test-activate-environment-custom-path
|
||||||
|
- test-activate-environment-no-project
|
||||||
- test-debian-unstable
|
- test-debian-unstable
|
||||||
- test-musl
|
- test-musl
|
||||||
- test-cache-key-os-version
|
- test-cache-key-os-version
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ Have a look under [Advanced Configuration](#advanced-configuration) for detailed
|
|||||||
# Custom path for the virtual environment when using activate-environment (default: .venv in the working directory)
|
# Custom path for the virtual environment when using activate-environment (default: .venv in the working directory)
|
||||||
venv-path: ""
|
venv-path: ""
|
||||||
|
|
||||||
|
# Pass --no-project when creating the venv with activate-environment.
|
||||||
|
no-project: "false"
|
||||||
|
|
||||||
# The directory to execute all commands in and look for files such as pyproject.toml
|
# The directory to execute all commands in and look for files such as pyproject.toml
|
||||||
working-directory: ""
|
working-directory: ""
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ inputs:
|
|||||||
type: boolean
|
type: boolean
|
||||||
venv-path:
|
venv-path:
|
||||||
type: string
|
type: string
|
||||||
|
no-project:
|
||||||
|
type: boolean
|
||||||
working-directory:
|
working-directory:
|
||||||
type: string
|
type: string
|
||||||
checksum:
|
checksum:
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ inputs:
|
|||||||
venv-path:
|
venv-path:
|
||||||
description: "Custom path for the virtual environment when using activate-environment. Defaults to '.venv' in the working directory."
|
description: "Custom path for the virtual environment when using activate-environment. Defaults to '.venv' in the working directory."
|
||||||
default: ""
|
default: ""
|
||||||
|
no-project:
|
||||||
|
description: "Pass --no-project when creating the venv with activate-environment."
|
||||||
|
default: "false"
|
||||||
working-directory:
|
working-directory:
|
||||||
description: "The directory to execute all commands in and look for files such as pyproject.toml"
|
description: "The directory to execute all commands in and look for files such as pyproject.toml"
|
||||||
default: ${{ github.workspace }}
|
default: ${{ github.workspace }}
|
||||||
|
|||||||
2
dist/save-cache/index.cjs
generated
vendored
2
dist/save-cache/index.cjs
generated
vendored
@@ -62968,6 +62968,7 @@ function loadInputs() {
|
|||||||
const versionFile = getVersionFile(workingDirectory);
|
const versionFile = getVersionFile(workingDirectory);
|
||||||
const pythonVersion = getInput("python-version");
|
const pythonVersion = getInput("python-version");
|
||||||
const activateEnvironment = getBooleanInput("activate-environment");
|
const activateEnvironment = getBooleanInput("activate-environment");
|
||||||
|
const noProject = getBooleanInput("no-project");
|
||||||
const venvPath = getVenvPath(workingDirectory, activateEnvironment);
|
const venvPath = getVenvPath(workingDirectory, activateEnvironment);
|
||||||
const checksum = getInput("checksum");
|
const checksum = getInput("checksum");
|
||||||
const enableCache = getEnableCache();
|
const enableCache = getEnableCache();
|
||||||
@@ -63004,6 +63005,7 @@ function loadInputs() {
|
|||||||
ignoreEmptyWorkdir,
|
ignoreEmptyWorkdir,
|
||||||
ignoreNothingToCache,
|
ignoreNothingToCache,
|
||||||
manifestFile,
|
manifestFile,
|
||||||
|
noProject,
|
||||||
pruneCache: pruneCache2,
|
pruneCache: pruneCache2,
|
||||||
pythonDir,
|
pythonDir,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
|
|||||||
10
dist/setup/index.cjs
generated
vendored
10
dist/setup/index.cjs
generated
vendored
@@ -96970,6 +96970,7 @@ function loadInputs() {
|
|||||||
const versionFile = getVersionFile(workingDirectory);
|
const versionFile = getVersionFile(workingDirectory);
|
||||||
const pythonVersion = getInput("python-version");
|
const pythonVersion = getInput("python-version");
|
||||||
const activateEnvironment2 = getBooleanInput("activate-environment");
|
const activateEnvironment2 = getBooleanInput("activate-environment");
|
||||||
|
const noProject = getBooleanInput("no-project");
|
||||||
const venvPath = getVenvPath(workingDirectory, activateEnvironment2);
|
const venvPath = getVenvPath(workingDirectory, activateEnvironment2);
|
||||||
const checksum = getInput("checksum");
|
const checksum = getInput("checksum");
|
||||||
const enableCache = getEnableCache();
|
const enableCache = getEnableCache();
|
||||||
@@ -97006,6 +97007,7 @@ function loadInputs() {
|
|||||||
ignoreEmptyWorkdir,
|
ignoreEmptyWorkdir,
|
||||||
ignoreNothingToCache,
|
ignoreNothingToCache,
|
||||||
manifestFile,
|
manifestFile,
|
||||||
|
noProject,
|
||||||
pruneCache,
|
pruneCache,
|
||||||
pythonDir,
|
pythonDir,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
@@ -97385,13 +97387,17 @@ async function activateEnvironment(inputs) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
info(`Creating and activating python venv at ${inputs.venvPath}...`);
|
info(`Creating and activating python venv at ${inputs.venvPath}...`);
|
||||||
await exec("uv", [
|
const venvArgs = [
|
||||||
"venv",
|
"venv",
|
||||||
inputs.venvPath,
|
inputs.venvPath,
|
||||||
"--directory",
|
"--directory",
|
||||||
inputs.workingDirectory,
|
inputs.workingDirectory,
|
||||||
"--clear"
|
"--clear"
|
||||||
]);
|
];
|
||||||
|
if (inputs.noProject) {
|
||||||
|
venvArgs.push("--no-project");
|
||||||
|
}
|
||||||
|
await exec("uv", venvArgs);
|
||||||
let venvBinPath = `${inputs.venvPath}${path16.sep}bin`;
|
let venvBinPath = `${inputs.venvPath}${path16.sep}bin`;
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
venvBinPath = `${inputs.venvPath}${path16.sep}Scripts`;
|
venvBinPath = `${inputs.venvPath}${path16.sep}Scripts`;
|
||||||
|
|||||||
@@ -218,13 +218,17 @@ async function activateEnvironment(inputs: SetupInputs): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
core.info(`Creating and activating python venv at ${inputs.venvPath}...`);
|
core.info(`Creating and activating python venv at ${inputs.venvPath}...`);
|
||||||
await exec.exec("uv", [
|
const venvArgs = [
|
||||||
"venv",
|
"venv",
|
||||||
inputs.venvPath,
|
inputs.venvPath,
|
||||||
"--directory",
|
"--directory",
|
||||||
inputs.workingDirectory,
|
inputs.workingDirectory,
|
||||||
"--clear",
|
"--clear",
|
||||||
]);
|
];
|
||||||
|
if (inputs.noProject) {
|
||||||
|
venvArgs.push("--no-project");
|
||||||
|
}
|
||||||
|
await exec.exec("uv", venvArgs);
|
||||||
|
|
||||||
let venvBinPath = `${inputs.venvPath}${path.sep}bin`;
|
let venvBinPath = `${inputs.venvPath}${path.sep}bin`;
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export interface SetupInputs {
|
|||||||
versionFile: string;
|
versionFile: string;
|
||||||
pythonVersion: string;
|
pythonVersion: string;
|
||||||
activateEnvironment: boolean;
|
activateEnvironment: boolean;
|
||||||
|
noProject: boolean;
|
||||||
venvPath: string;
|
venvPath: string;
|
||||||
checksum: string;
|
checksum: string;
|
||||||
enableCache: boolean;
|
enableCache: boolean;
|
||||||
@@ -49,6 +50,7 @@ export function loadInputs(): SetupInputs {
|
|||||||
const versionFile = getVersionFile(workingDirectory);
|
const versionFile = getVersionFile(workingDirectory);
|
||||||
const pythonVersion = core.getInput("python-version");
|
const pythonVersion = core.getInput("python-version");
|
||||||
const activateEnvironment = core.getBooleanInput("activate-environment");
|
const activateEnvironment = core.getBooleanInput("activate-environment");
|
||||||
|
const noProject = core.getBooleanInput("no-project");
|
||||||
const venvPath = getVenvPath(workingDirectory, activateEnvironment);
|
const venvPath = getVenvPath(workingDirectory, activateEnvironment);
|
||||||
const checksum = core.getInput("checksum");
|
const checksum = core.getInput("checksum");
|
||||||
const enableCache = getEnableCache();
|
const enableCache = getEnableCache();
|
||||||
@@ -87,6 +89,7 @@ export function loadInputs(): SetupInputs {
|
|||||||
ignoreEmptyWorkdir,
|
ignoreEmptyWorkdir,
|
||||||
ignoreNothingToCache,
|
ignoreNothingToCache,
|
||||||
manifestFile,
|
manifestFile,
|
||||||
|
noProject,
|
||||||
pruneCache,
|
pruneCache,
|
||||||
pythonDir,
|
pythonDir,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
|
|||||||
Reference in New Issue
Block a user