File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,8 +13,16 @@ permissions:
1313 contents : read
1414
1515jobs :
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
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; }
You can’t perform that action at this time.
0 commit comments