3333 - ubuntu-20.04
3434 python :
3535 - " 3.11"
36+ - " 3.12"
3637 nox-session :
3738 # To speed things up a bit we use the special ci_checks_max session
3839 # that uses the same venv to run multiple linting sessions
@@ -88,10 +89,14 @@ jobs:
8889 # The job name should match the name of the `nox` job.
8990 name : Test with nox
9091 needs : ["nox"]
92+ # We skip this job only if nox was also skipped
93+ if : always() && needs.nox.result != 'skipped'
9194 runs-on : ubuntu-20.04
95+ env :
96+ DEPS_RESULT : ${{ needs.nox.result }}
9297 steps :
93- - name : Return true
94- run : " true "
98+ - name : Check matrix job result
99+ run : test "$DEPS_RESULT" = "success "
95100
96101 nox-cross-arch :
97102 name : Cross-arch tests with nox
@@ -109,6 +114,7 @@ jobs:
109114 - ubuntu-20.04
110115 python :
111116 - " 3.11"
117+ - " 3.12"
112118 nox-session :
113119 - " pytest_min"
114120 - " pytest_max"
@@ -140,8 +146,10 @@ jobs:
140146 uses : docker/build-push-action@v5
141147 with :
142148 context : .github/containers/nox-cross-arch
143- file : .github/containers/nox-cross-arch/${{ matrix.arch }}-${{ matrix.os }}-python-${{ matrix.python }} .Dockerfile
149+ file : .github/containers/nox-cross-arch/${{ matrix.arch }}-${{ matrix.os }}-python.Dockerfile
144150 platforms : linux/${{ matrix.arch }}
151+ build-args : |
152+ PYTHON_VERSION=${{ matrix.python }}
145153 tags : localhost/nox-cross-arch:latest
146154 push : false
147155 load : true
@@ -200,10 +208,14 @@ jobs:
200208 # The job name should match the name of the `nox-cross-arch` job.
201209 name : Cross-arch tests with nox
202210 needs : ["nox-cross-arch"]
211+ # We skip this job only if nox-cross-arch was also skipped
212+ if : always() && needs.nox-cross-arch.result != 'skipped'
203213 runs-on : ubuntu-20.04
214+ env :
215+ DEPS_RESULT : ${{ needs.nox-cross-arch.result }}
204216 steps :
205- - name : Return true
206- run : " true "
217+ - name : Check matrix job result
218+ run : test "$DEPS_RESULT" = "success "
207219
208220 build :
209221 name : Build distribution packages
@@ -239,7 +251,15 @@ jobs:
239251 test-installation :
240252 name : Test package installation in different architectures
241253 needs : ["build"]
242- runs-on : ubuntu-20.04
254+ strategy :
255+ fail-fast : false
256+ matrix :
257+ os :
258+ - ubuntu-20.04
259+ python :
260+ - " 3.11"
261+ - " 3.12"
262+ runs-on : ${{ matrix.os }}
243263 steps :
244264 - name : Fetch sources
245265 uses : actions/checkout@v4
@@ -258,9 +278,28 @@ jobs:
258278 context : .
259279 file : .github/containers/test-installation/Dockerfile
260280 platforms : linux/amd64,linux/arm64
281+ build-args : |
282+ PYTHON_VERSION=${{ matrix.python }}
261283 tags : localhost/test-installation
262284 push : false
263285
286+ # This job runs if all the `test-installation` matrix jobs ran and succeeded.
287+ # It is only used to have a single job that we can require in branch
288+ # protection rules, so we don't have to update the protection rules each time
289+ # we add or remove a job from the matrix.
290+ test-installation-all :
291+ # The job name should match the name of the `test-installation` job.
292+ name : Test package installation in different architectures
293+ needs : ["test-installation"]
294+ # We skip this job only if test-installation was also skipped
295+ if : always() && needs.test-installation.result != 'skipped'
296+ runs-on : ubuntu-20.04
297+ env :
298+ DEPS_RESULT : ${{ needs.test-installation.result }}
299+ steps :
300+ - name : Check matrix job result
301+ run : test "$DEPS_RESULT" = "success"
302+
264303 test-docs :
265304 name : Test documentation website generation
266305 if : github.event_name != 'push'
0 commit comments