Skip to content

Conversation

@KyleKing
Copy link
Owner

Add 'uv venv' step before 'uv pip install' in both tests and prek-hook jobs to fix "No virtual environment found" error. The uv package manager requires an active virtual environment for pip operations.

Add 'uv venv' step before 'uv pip install' in both tests and prek-hook
jobs to fix "No virtual environment found" error. The uv package manager
requires an active virtual environment for pip operations.
Add venv activation step that adds .venv/bin (or Scripts on Windows) to
GITHUB_PATH. This ensures non-uv tools like pytest and prek use the
correct Python interpreter and installed packages from the virtual
environment.

Without this, pytest and prek would use the system Python and not find
the test dependencies installed by uv pip.
Use the setup-uv action's built-in activate-environment parameter
instead of manually creating and activating virtual environments. This
simplifies the workflow by eliminating repetitive venv setup code and
leveraging the action's cross-platform venv handling.

The activate-environment parameter automatically creates a venv and
makes it available to subsequent steps, reducing the workflow from
multiple manual steps to a single declarative configuration.
@KyleKing KyleKing merged commit 3cbc78b into main Nov 21, 2025
8 checks passed
@KyleKing KyleKing deleted the claude/fix-ci-venv-setup-01Hq76GzkUyhLv3TEwFySUfi branch November 21, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants