astral-sh / astral-sh/setup-uv
version-file does not respect uv.lock or dependency-groups
- Dominant language
- TypeScript
- Stars
- 865
- Forks
- 109
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 15
Description
I wanted to not have to update my GHA every time I update uv, so I found this option:
```
# Path to a file containing the version of uv to install (default: searches uv.toml then pyproject.toml)
version-file: ""
```
I have uv setup on pyproject.toml as a
```
[dependency-groups]
uv = [
"uv==0.8.17",
]
```
I also have
```
[tool.uv]
required-version = ">=0.5.21"
```
Therefore I do have uv locked in `uv.lock`.
What I don't get is why `uv.lock` is being ignored and also the dependency group.
The output from the task is
```
Found version for uv in /home/runner/_work/path/path/pyproject.toml: >=0.5.21
Found minimum version specifier, using latest version
Getting latest version from GitHub API...
manifest-file not provided, reading from local file.
manifest-file does not contain version 0.9.10, arch x86_64, platform unknown-linux-gnu. Falling back to GitHub releases.
Downloading uv from "https://github.com/astral-sh/uv/releases/download/0.9.10/uv-x86_64-unknown-linux-gnu.tar.gz" ...
````
Is there a way to specify that it uses the version locked? I cannot change `required-version` because it breaks perfectly good installations and it works as a bare minimum for other actions. Plus if I bump the required-version, the devs can't even update uv itself
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the GitHub Action's version-file input and compare its lookup with the pyproject.toml dependency-groups and uv.lock examples. Done means a workflow can use the locked uv version without being forced to change required-version; add coverage for the shown configuration if the repository provides a matching test entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python, typescript
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100