-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (99 loc) · 3.57 KB
/
variants.yml
File metadata and controls
107 lines (99 loc) · 3.57 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Python/VENV/Installer Variants
on:
push:
workflow_call:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version:
# we test on lowest and highest supported versions
- "3.10"
- "3.14"
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: VENV to be created with pip
run: |
make VENV_ENABLED=true VENV_CREATE=true PRIMARY_PYTHON=python3 PYTHON_PACKAGE_INSTALLER=pip test
make clean
- name: VENV to be created with uv (local install, no global UV)
run: |
make VENV_ENABLED=true VENV_CREATE=true PYTHON_PACKAGE_INSTALLER=uv PRIMARY_PYTHON=python3 test
make clean
- name: VENV to be created with uv (global UV auto-detected)
run: |
pip install uv
make VENV_ENABLED=true VENV_CREATE=true PYTHON_PACKAGE_INSTALLER=uv PRIMARY_PYTHON=${{ matrix.python-version }} test
make clean
pip uninstall -y uv
- name: VENV pre-installed with pip
run: |
python -m venv existingvenv
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv PRIMARY_PYTHON=python3 PYTHON_PACKAGE_INSTALLER=pip test
make clean
rm -r existingvenv
- name: VENV pre-installed with uv (local install, no global UV)
run: |
python -m venv existingvenv
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv PRIMARY_PYTHON=python3 PYTHON_PACKAGE_INSTALLER=uv test
make clean
rm -r existingvenv
- name: VENV pre-installed with uv (global UV auto-detected)
run: |
python -m venv existingvenv
pip install uv
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv PYTHON_PACKAGE_INSTALLER=uv PRIMARY_PYTHON=python3 test
make clean
pip uninstall -y uv
rm -r existingvenv
- name: VENV with global UV using different UV_PYTHON
run: |
pip install uv
make VENV_ENABLED=true VENV_CREATE=true PYTHON_PACKAGE_INSTALLER=uv PRIMARY_PYTHON=python3 UV_PYTHON=${{ matrix.python-version }} test
make clean
pip uninstall -y uv
- name: Global Python with pip
run: |
make VENV_ENABLED=false VENV_CREATE=false PRIMARY_PYTHON=python3 PYTHON_PACKAGE_INSTALLER=pip test
make clean
uv-only:
name: UV-only (no Python) - Python ${{ matrix.uv-python }}
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
strategy:
fail-fast: false
matrix:
uv-python: ["3.10", "3.14"]
steps:
- name: Install system dependencies (NOT Python)
run: |
apt-get update
apt-get install -y make curl ca-certificates git
- uses: actions/checkout@v5
- name: Install UV globally
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Verify NO Python installed
run: |
! which python3 || (echo "ERROR: Python found!" && exit 1)
! which python || (echo "ERROR: Python found!" && exit 1)
- name: Run make install with UV only
run: make UV_PYTHON=${{ matrix.uv-python }} install
- name: Verify venv created with correct Python version
run: |
.venv/bin/python --version
.venv/bin/python --version | grep "${{ matrix.uv-python }}"