Skip to content

Commit 8cec201

Browse files
authored
Merge pull request #20 from EverMind-AI/ci/python-version-matrix
ci: run the floor as well as the latest Python
2 parents b81aaca + c3e7810 commit 8cec201

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
build:
16+
test:
1717
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
# Floor + latest. The floor is the version setup.py's `python_requires`
21+
# promises (>=3.12): a promise nothing runs is how 1.0.0 and both release
22+
# candidates shipped a Requires-Python they had never tested. Keep this in
23+
# step with templates/setup.mustache in the factory.
24+
matrix:
25+
python-version: ["3.12", "3.14"]
1826
steps:
1927
- uses: actions/checkout@v5
2028

@@ -31,7 +39,7 @@ jobs:
3139
- uses: actions/setup-python@v6
3240
if: steps.detect.outputs.has_pkg == 'true'
3341
with:
34-
python-version: "3.14"
42+
python-version: ${{ matrix.python-version }}
3543

3644
- name: Install
3745
if: steps.detect.outputs.has_pkg == 'true'
@@ -136,3 +144,19 @@ jobs:
136144
run: |
137145
python -m pip install --upgrade build
138146
python -m build
147+
148+
# Aggregate gate. Branch protection pins required checks BY NAME, and a matrix
149+
# job reports as `test (3.12)` / `test (3.14)` — never as a single stable name.
150+
# Without this job the required `build` check simply never arrives and the PR
151+
# blocks forever; with it, the matrix can grow or shrink without anyone editing
152+
# the ruleset.
153+
build:
154+
needs: [test]
155+
if: always()
156+
runs-on: ubuntu-latest
157+
steps:
158+
- name: Gate on the matrix result
159+
run: |
160+
echo "matrix result: ${{ needs.test.result }}"
161+
[ "${{ needs.test.result }}" = "success" ] || {
162+
echo "::error::one or more Python versions failed"; exit 1; }

0 commit comments

Comments
 (0)