Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 51 additions & 20 deletions .github/workflows/integtests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,30 @@ on:

jobs:

# Single source of truth: the oldest supported Python is whatever setup.py
# declares in `python_requires`. Every job below derives its cross-version
# target from this output instead of hardcoding a version.
min-python:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.minpy.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Read minimum supported Python from setup.py
id: minpy
run: |
version=$(grep python_requires setup.py | grep -oE '[0-9]+\.[0-9]+' | head -1)
echo "Minimum supported Python: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"

archlinux:
needs: min-python
runs-on: ubuntu-latest
container:
# Use https://github.com/gilgamezh/archlinux-python39 to save the python build time
image: gilgamezh/archlinux-python39:latest
# archlinux:latest ships the newest CPython (rolling release), so this
# job exercises fades against the bleeding-edge Python. An older
# interpreter for the cross-version test is provided via uv at runtime.
image: archlinux:latest
volumes:
- ${{ github.workspace }}:/fades
steps:
Expand All @@ -22,16 +41,22 @@ jobs:
fetch-depth: 0
- name: Install dependencies
run: |
pacman -Suy --noconfirm python3 python-packaging
- name: Simple fades run
pacman -Suy --noconfirm python3 python-packaging uv git
- name: Simple fades run (newest Python)
run: |
cd /fades
bin/fades -v -d pytest -x pytest --version
- name: Using a different Python
- name: Using the oldest supported Python
env:
OLDEST: ${{ needs.min-python.outputs.version }}
run: |
python bin/fades -v --python=python3.9 -d pytest -x pytest -v --integtest-pyversion=3.9 tests/integtest.py
cd /fades
uv python install "$OLDEST"
OLD=$(uv python find "$OLDEST")
python bin/fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py

fedora:
needs: min-python
runs-on: ubuntu-latest
container:
image: fedora:latest
Expand All @@ -44,25 +69,29 @@ jobs:
fetch-depth: 0
- name: Install dependencies
run: |
yum install --assumeyes python3.13 python-packaging
dnf install --assumeyes python3 python3-packaging uv git
- name: Simple fades run
run: |
cd /fades
bin/fades -v -d pytest -x pytest --version
- name: Using a different Python
- name: Using the oldest supported Python
env:
OLDEST: ${{ needs.min-python.outputs.version }}
run: |
yum install --assumeyes python3.9
cd /fades
python3.13 bin/fades -v --python=python3.9 -d pytest -x pytest -v --integtest-pyversion=3.9 tests/integtest.py
uv python install "$OLDEST"
OLD=$(uv python find "$OLDEST")
python3 bin/fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py

native-windows:
needs: min-python
strategy:
matrix:
# just a selection otherwise it's too much
# - latest OS (left here even if it's only one to simplify upgrading later)
# - oldest and newest Python
# - oldest (from setup.py) and newest Python
os: [windows-2025]
python-version: [3.8, "3.13"]
python-version: ["${{ needs.min-python.outputs.version }}", "3.13"]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -74,11 +103,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Also set up Python 3.10 for cross-Python test
- name: Also set up the oldest supported Python for cross-Python test
uses: actions/setup-python@v5
id: otherpy
with:
python-version: "3.10"
python-version: ${{ needs.min-python.outputs.version }}

- name: Install dependencies
run: |
Expand All @@ -89,16 +118,17 @@ jobs:

- name: Using a different Python
run: |
${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=3.10 tests/integtest.py
${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=${{ needs.min-python.outputs.version }} tests/integtest.py

native-generic:
needs: min-python
strategy:
matrix:
# just a selection otherwise it's too much
# - latest OSes
# - oldest and newest Python
# - oldest (from setup.py) and newest Python
os: [ubuntu-24.04, macos-15]
python-version: [3.8, "3.13"]
python-version: ["${{ needs.min-python.outputs.version }}", "3.13"]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -110,10 +140,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Also set up Python 3.10 for cross-Python test
- name: Also set up the oldest supported Python for cross-Python test
uses: actions/setup-python@v5
id: otherpy
with:
python-version: "3.10"
python-version: ${{ needs.min-python.outputs.version }}

- name: Install dependencies
run: |
Expand All @@ -124,4 +155,4 @@ jobs:

- name: Using a different Python
run: |
${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=python3.10 -d pytest -x pytest -v --integtest-pyversion=3.10 tests/integtest.py
${{ steps.matrixpy.outputs.python-path }} bin/fades -v --python=${{ steps.otherpy.outputs.python-path }} -d pytest -x pytest -v --integtest-pyversion=${{ needs.min-python.outputs.version }} tests/integtest.py
Loading