Skip to content

uv is re-installed #7

@mschoettle

Description

@mschoettle

I finally switched a project to uv and trying out this action. I already have the setup-uv step in my workflow before the pre-commit action is used. I also uv sync dependencies. For some reason, uv is re-installed:

Run tox-dev/action-pre-commit-uv@v1.0.2
Run astral-sh/setup-uv@v5
Found uv in tool-cache for 0.6.6
Added /opt/hostedtoolcache/uv/0.6.6/x86_64 to the path
Added /home/runner/.local/bin to the path
Set UV_CACHE_DIR to /home/runner/work/_temp/setup-uv-cache
Successfully installed uv version 0.6.6
Searching files using cache dependency glob: .pre-commit-config.yaml
/home/runner/work/docs/docs/.pre-commit-config.yaml
Found 1 files to hash.
Trying to restore uv cache from GitHub Actions cache with key: setup-uv-1-x86_64-unknown-linux-gnu-3.13.2-f6a8c88bd4285ed5d07bd71322fb25dadfc2c4542b209d8469fd1541861652ba
No GitHub Actions cache found for key: setup-uv-1-x86_64-unknown-linux-gnu-3.13.2-f6a8c88bd4285ed5d07bd71322fb25dadfc2c4542b209d8469fd1541861652ba
Run uv run --isolated --no-sync true && echo "pythonLocation=$(uv python find)" >>$GITHUB_ENV
Run actions/cache@v4
Cache not found for input keys: pre-commit-3|/home/runner/work/docs/docs/.venv/bin/python3|f6a8c88bd4285ed5d07bd71322fb25dadfc2c4542b209d8469fd1541861652ba
Run uv run --no-sync --with pre-commit-uv pre-commit run --show-diff-on-failure --color=always --all-files
Downloading virtualenv (4.1MiB)
Downloading uv (15.5MiB)
 Downloaded virtualenv
 Downloaded uv
Installed 11 packages in 8ms

The relevant part of the workflow is:

      - uses: astral-sh/setup-uv@v5.3.1
        id: setup-uv
        with:
          # renovate: datasource=pypi dependency=uv
          version: "0.6.6"
      - name: Install pre-commit
        run: |
          uv sync --locked --only-dev
          echo "Installed uv version is $(uv --version)"
          echo "Installed Python version is $(python --version)"
      - uses: tox-dev/action-pre-commit-uv@v1.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions