Debian Codegraph @

.github/workflows/integtests.yaml

raw
1 name: Integration Tests
2
3 on:
4 push:
5 branches: [ master ]
6 pull_request:
7 branches: [ master ]
8
9 jobs:
10
11 # Single source of truth: the oldest supported Python is whatever setup.py
12 # declares in `python_requires`. Every job below derives its cross-version
13 # target from this output instead of hardcoding a version.
14 min-python:
15 runs-on: ubuntu-latest
16 outputs:
17 version: ${{ steps.minpy.outputs.version }}
18 steps:
19 - uses: actions/checkout@v4
20 - name: Read minimum supported Python from setup.py
21 id: minpy
22 run: |
23 version=$(grep python_requires setup.py | grep -oE '[0-9]+\.[0-9]+' | head -1)
24 echo "Minimum supported Python: $version"
25 echo "version=$version" >> "$GITHUB_OUTPUT"
26
27 archlinux:
28 needs: min-python
29 runs-on: ubuntu-latest
30 container:
31 # archlinux:latest ships the newest CPython (rolling release), so this
32 # job exercises fades against the bleeding-edge Python. An older
33 # interpreter for the cross-version test is provided via uv at runtime.
34 image: archlinux:latest
35 volumes:
36 - ${{ github.workspace }}:/fades
37 steps:
38 - name: Checkout code
39 uses: actions/checkout@v4
40 with:
41 fetch-depth: 0
42 - name: Install dependencies
43 run: |
44 pacman -Suy --noconfirm python3 python-packaging uv git
45 - name: Simple fades run (newest Python)
46 run: |
47 cd /fades
48 bin/fades -v -d pytest -x pytest --version
49 - name: Using the oldest supported Python
50 env:
51 OLDEST: ${{ needs.min-python.outputs.version }}
52 run: |
53 cd /fades
54 uv python install "$OLDEST"
55 OLD=$(uv python find "$OLDEST")
56 python bin/fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py
57
58 fedora:
59 needs: min-python
60 runs-on: ubuntu-latest
61 container:
62 image: fedora:latest
63 volumes:
64 - ${{ github.workspace }}:/fades
65 steps:
66 - name: Checkout code
67 uses: actions/checkout@v4
68 with:
69 fetch-depth: 0
70 - name: Install dependencies
71 run: |
72 dnf install --assumeyes python3 python3-packaging uv git
73 - name: Simple fades run
74 run: |
75 cd /fades
76 bin/fades -v -d pytest -x pytest --version
77 - name: Using the oldest supported Python
78 env:
79 OLDEST: ${{ needs.min-python.outputs.version }}
80 run: |
81 cd /fades
82 uv python install "$OLDEST"
83 OLD=$(uv python find "$OLDEST")
84 python3 bin/fades -v --python="$OLD" -d pytest -x pytest -v --integtest-pyversion="$OLDEST" tests/integtest.py
85
86 native-windows:
87 needs: min-python
88 strategy:
89 matrix:
90 # just a selection otherwise it's too much
91 # - latest OS (left here even if it's only one to simplify upgrading later)
92 # - oldest (from setup.py) and newest Python
93 os: [windows-2025]
94 python-version: ["${{ needs.min-python.outputs.version }}", "3.13"]
95
96 runs-on: ${{ matrix.os }}
97 steps:
98 - uses: actions/checkout@v4
99
100 - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
101 uses: actions/setup-python@v5
102 id: matrixpy
103 with:
104 python-version: ${{ matrix.python-version }}
105
106 - name: Also set up the oldest supported Python for cross-Python test
107 uses: actions/setup-python@v5
108 id: otherpy
109 with:
110 python-version: ${{ needs.min-python.outputs.version }}
111
112 - name: Install dependencies
113 run: |
114 ${{ steps.matrixpy.outputs.python-path }} -m pip install -U packaging
115 - name: Simple fades run
116 run: |
117 ${{ steps.matrixpy.outputs.python-path }} bin/fades -v -d pytest -x pytest --version
118
119 - name: Using a different Python
120 run: |
121 ${{ 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
122
123 native-generic:
124 needs: min-python
125 strategy:
126 matrix:
127 # just a selection otherwise it's too much
128 # - latest OSes
129 # - oldest (from setup.py) and newest Python
130 os: [ubuntu-24.04, macos-15]
131 python-version: ["${{ needs.min-python.outputs.version }}", "3.13"]
132
133 runs-on: ${{ matrix.os }}
134 steps:
135 - uses: actions/checkout@v4
136
137 - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
138 uses: actions/setup-python@v5
139 id: matrixpy
140 with:
141 python-version: ${{ matrix.python-version }}
142
143 - name: Also set up the oldest supported Python for cross-Python test
144 uses: actions/setup-python@v5
145 id: otherpy
146 with:
147 python-version: ${{ needs.min-python.outputs.version }}
148
149 - name: Install dependencies
150 run: |
151 ${{ steps.matrixpy.outputs.python-path }} -m pip install -U packaging
152 - name: Simple fades run
153 run: |
154 ${{ steps.matrixpy.outputs.python-path }} bin/fades -v -d pytest -x pytest --version
155
156 - name: Using a different Python
157 run: |
158 ${{ 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