| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
name: 'Setup Python Environment with UV' |
| 5 |
description: 'Checks out code, sets up UV with a specific Python version, installs dependencies, and lists them.' |
| 6 |
|
| 7 |
inputs: |
| 8 |
python-version: |
| 9 |
description: 'Python version to set up (e.g., "3.9", "3.11")' |
| 10 |
required: true |
| 11 |
|
| 12 |
runs: |
| 13 |
using: "composite" |
| 14 |
steps: |
| 15 |
|
| 16 |
- name: Setup uv for Python ${{ inputs.python-version }} |
| 17 |
uses: astral-sh/setup-uv@v6 |
| 18 |
with: |
| 19 |
python-version: ${{ inputs.python-version }} |
| 20 |
activate-environment: true |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
- name: Install dependencies with uv |
| 26 |
run: | |
| 27 |
uv sync -p ${{ inputs.python-version }} |
| 28 |
echo "----------------------------------------" |
| 29 |
echo "Installed packages for Python ${{ inputs.python-version }}:" |
| 30 |
uv pip list |
| 31 |
echo "----------------------------------------" |
| 32 |
shell: bash |