mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-12-23 11:01:03 +00:00
Add resolution-strategy input to support oldest compatible version selection (#631)
Adds a new `resolution-strategy` input that allows users to choose between installing the highest (default) or lowest compatible version when resolving version ranges.
This commit is contained in:
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@@ -111,15 +111,25 @@ jobs:
|
||||
expected-version: "0.3.5"
|
||||
- version-input: ">=0.4.25,<0.5"
|
||||
expected-version: "0.4.30"
|
||||
- version-input: ">=0.4.25,<0.5"
|
||||
expected-version: "0.4.25"
|
||||
resolution-strategy: "lowest"
|
||||
- version-input: ">=0.1,<0.2"
|
||||
expected-version: "0.1.45"
|
||||
resolution-strategy: "highest"
|
||||
- version-input: ">=0.1.0,<0.2"
|
||||
expected-version: "0.1.0"
|
||||
resolution-strategy: "lowest"
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version ${{ matrix.input.version-input }}
|
||||
- name: Install version ${{ matrix.input.version-input }} with strategy ${{ matrix.input.resolution-strategy || 'highest' }}
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
version: ${{ matrix.input.version-input }}
|
||||
resolution-strategy: ${{ matrix.input.resolution-strategy || 'highest' }}
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user