Skip to content

uv venv and github actions scripts / workflows #1386

@strickvl

Description

@strickvl

Having trouble converting our pre-existing CI workflows / scripts to use uv, as you can see here. Problem relates to the virtual environments which don't seem to be retained between workflow steps.

This is maybe the easiest illustration of that:

  steps:
      - name: Checkout code
        uses: actions/checkout@v4.1.1
      - name: Set up Python
        uses: actions/setup-python@v5.0.0
        with:
          python-version: '3.10'
      - name: Install current package as editable
        run: |
          pip install uv
          uv venv
          uv pip install darglint
      - name: Check docstrings
        run: bash scripts/docstring.sh

One step installs it, and then the next step runs a script which in turn attempts to use the package, but it fails because the CI can't be found.

I don't see any docs yet, so wondering how best to handle this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionAsking for clarification or supportvirtualenvRelated to virtual environments

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions