astral-sh / setup-uv

Set up your GitHub Actions workflow with a specific version of https://docs.astral.sh/uv/
MIT License
125 stars 7 forks source link

Error: No file in /home/runner/work/copier-uv/copier-uv matched to [**/uv.lock] #105

Closed pawamoy closed 5 hours ago

pawamoy commented 5 hours ago

Upgrading from v1 to v3, I'm now getting this error. I don't track lock files. I'm testing a Copier template, generating a Python project and testing it on each Python version. The lock file is generated after the first time I use uv sync.

https://github.com/pawamoy/copier-uv/actions/runs/11075468747/job/30776499483

Should I do as described in the readme and specify an empty glob?

- name: Never invalidate the cache
  uses: astral-sh/setup-uv@v3
  with:
    enable-cache: true
    cache-dependency-glob: ""

What will that do? Invalidate the cache every time? Then I should just disable the cache?

pawamoy commented 5 hours ago

I ended up doing this:

    - name: Setup uv
      uses: astral-sh/setup-uv@v3
      with:
        enable-cache: true
        cache-dependency-glob: project/pyproject.toml.jinja
        cache-suffix: py${{ matrix.python-version }}