Skip to content

Commit

Permalink
fixes #30 Add variants to CI to test VENV variants
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Mar 1, 2024
1 parent cedbfe7 commit ca80633
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/variants.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Variants of Python/VENV and installer type tests

on: [push]

jobs:
build:
strategy:
fail-fast: false
matrix:
python-version:
# we test on lowest and highest supported versions
- "3.8"
- "3.12"
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: VENV to be created with pip
run: \
make VENV_ENABLED=true VENV_CREATE=true PYTHON_PACKAGE_INSTALLER=pip test
make clean
- name: VENV to be created with uv to be installed
run: \
make VENV_ENABLED=true VENV_CREATE=true PYTHON_PACKAGE_INSTALLER=uv MXENV_UV_GLOBAL=false test
make clean
- name: VENV to be created with uv globally pre-installed
run: \
pip install uv \
make VENV_ENABLED=true VENV_CREATE=true PYTHON_PACKAGE_INSTALLER=uv MXENV_UV_GLOBAL=true test \
make clean \
pip uninstall uv
- name: VENV pre-installed with pip
run: \
python -m venv existingvenv \
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv PYTHON_PACKAGE_INSTALLER=pip test \
make clean \
rm -rf existingvenv
- name: VENV pre-installed with uv to be installed
run: \
python -m venv existingvenv
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv PYTHON_PACKAGE_INSTALLER=uv MXENV_UV_GLOBAL=false test \
make clean \
rm -rf existingvenv
- name: VENV pre-installed with uv globally pre-installed
run: \
python -m venv existingvenv
pip install uv \
make VENV_ENABLED=true VENV_CREATE=false VENV_FOLDER=existingvenv PYTHON_PACKAGE_INSTALLER=uv MXENV_UV_GLOBAL=true test \
make clean \
pip uninstall uv
rm -rf existingvenv
- name: Global Python with pip
run: \
make VENV_ENABLED=false VENV_CREATE=false PYTHON_PACKAGE_INSTALLER=pip test \
make clean \
- name: Global Python with uv to be installed
run: \
make VENV_ENABLED=false VENV_CREATE=false PYTHON_PACKAGE_INSTALLER=uv MXENV_UV_GLOBAL=false test \
make clean \
- name: Global Python with uv globally pre-installed
run: \
pip install uv \
make VENV_ENABLED=false VENV_CREATE=false PYTHON_PACKAGE_INSTALLER=uv MXENV_UV_GLOBAL=true test \
make clean \
pip uninstall uv

0 comments on commit ca80633

Please sign in to comment.