Skip to content

Bump astral-sh/setup-uv from 5 to 7 #277

Bump astral-sh/setup-uv from 5 to 7

Bump astral-sh/setup-uv from 5 to 7 #277

Workflow file for this run

name: Python/VENV/Installer Variants
on:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
pip-variant:
strategy:
fail-fast: false
matrix:
# lowest and highest supported versions
python-version: ["3.10", "3.14"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Switch project Makefile to the pip variant
run: |
python -m pip install -e .
sed -i.bak 's/^#: core.mxenv-uv/#: core.mxenv-pip/' Makefile && rm -f Makefile.bak
mxmake update
- name: VENV created with pip
run: |
make VENV_ENABLED=true VENV_CREATE=true PRIMARY_PYTHON=python3 test
make clean
- name: VENV pre-installed with pip
run: |
python -m venv existingvenv
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv PRIMARY_PYTHON=python3 test
make clean
rm -r existingvenv
- name: Global Python with pip
run: |
make VENV_ENABLED=false VENV_CREATE=false PRIMARY_PYTHON=python3 test
make clean
uv-variant:
strategy:
fail-fast: false
matrix:
# lowest and highest supported versions
python-version: ["3.10", "3.14"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: VENV created with uv
run: |
make VENV_ENABLED=true VENV_CREATE=true PRIMARY_PYTHON=python3 UV_PYTHON=${{ matrix.python-version }} test
make clean
- name: VENV pre-installed with uv
run: |
uv venv -p ${{ matrix.python-version }} --seed existingvenv
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv UV_PYTHON=${{ matrix.python-version }} test
make clean
rm -r existingvenv
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@v6
- 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 }}"