-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
61 lines (55 loc) · 1.52 KB
/
action.yml
File metadata and controls
61 lines (55 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Setup Python
description: 'Ensure python is installed, and setup pypi caching'
inputs:
version:
type: choice
description: "Version to install"
options:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.13t'
- '3.14'
- '3.14t'
default: '3.11'
uv:
type: boolean
description: "Use uv to install python packages"
default: 'true'
runs:
using: 'composite'
steps:
- name: Set up Python ${{ inputs.version }}
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.version }}
allow-prereleases: true
if: ${{ inputs.uv == 'true' }}
- name: Set up Python ${{ inputs.version }}
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.version }}
allow-prereleases: true
cache: "pip"
cache-dependency-path: |
"**/pyproject.toml"
"**/setup.py"
if: ${{ inputs.uv != 'true' }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "${{ inputs.version }}"
enable-cache: true
ignore-nothing-to-cache: true
prune-cache: false
if: ${{ inputs.uv == 'true' }}
- name: Setup uv to use system python without extra flags
shell: bash
run: echo "UV_SYSTEM_PYTHON=1" >> $GITHUB_ENV
if: ${{ inputs.uv == 'true' }}
- name: Install uv as a python package for use of `python -m uv`
shell: bash
run: python -m pip install uv
if: ${{ inputs.uv == 'true' }}