Skip to content

uv is re-installed #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mschoettle opened this issue Mar 12, 2025 · 1 comment
Open

uv is re-installed #7

mschoettle opened this issue Mar 12, 2025 · 1 comment

Comments

@mschoettle
Copy link

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/[email protected]
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/[email protected]
        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/[email protected]
@mschoettle
Copy link
Author

Ah, it must come from --with pre-commit-uv

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

No branches or pull requests

1 participant