Debian Codegraph @

.github/actions/setup-python-uv/action.yml

raw symbols SCIP
1 # .github/actions/setup-python-uv/action.yml
2 # Composite action to checkout code, setup Python with UV, and install dependencies.
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 # Step 1: Setup uv (Python package installer and resolver)
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 # Makes uv-managed Python available on PATH for subsequent steps.
21
22 # Step 2: Install dependencies using uv sync
23 # This command assumes your project dependencies are defined in a way uv can understand
24 # (e.g., pyproject.toml, requirements.txt).
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