Skip to content
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

Add support for uv python-version key #26

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.12"
- name: Set up Python environment
uses: ./setup-uv
- run: uv --version
Expand All @@ -31,14 +27,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.12"
- name: Set up Python environment
uses: ./setup-uv
with:
version: 0.4.0
python-version: "3.12"
- run: uv --version

setup_uv_lockfile:
Expand All @@ -47,14 +40,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.12"
- name: Set up Python environment
uses: ./setup-uv
with:
lockfile: .github/workflows/lockfile.txt
python-version: "3.12"
- run: uv --version
- run: python -m build --version

Expand All @@ -64,15 +54,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.12"
- name: Set up Python environment
uses: ./setup-uv
with:
lockfile: .github/workflows/lockfile.txt
only-binary: ":none:"
python-version: "3.12"
- run: uv --version
- run: python -m build --version

Expand Down
12 changes: 11 additions & 1 deletion setup-uv/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
description: 'uv version to install.'
required: false
default: '0.5.26'
python-version:
description: 'Python version to install.'
required: false
default: '3.13'
lockfile:
description: 'Packages to install.'
required: false
Expand All @@ -21,7 +25,13 @@ runs:
- name: Setup uv
uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
with:
version: ${{ inputs.version }}
version: ${{ inputs.version }}
enable-cache: false

- name: Install python version
if: ${{ inputs.python-version != '' }}
run: uv python install ${{ inputs.python-version }}
shell: bash

- name: Install packages
if: ${{ inputs.lockfile != '' }}
Expand Down
Loading