Skip to content

Commit 6fb4452

Browse files
committed
ci: Fix the condition to run the nox-all and nox-cross-arch-all jobs
If the underlying matrix jobs (nox and nox-cross-arch) fail, the -all jobs are skipped, but this is not what we want when running in the merge queue, as we want the merge queue checks to too fail in this case. So we need to propagate the failures of the matrix jobs to the -all jobs, they should only be skipped if the matrix jobs were skipped too. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 1e99acc commit 6fb4452

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,14 @@ jobs:
8888
# The job name should match the name of the `nox` job.
8989
name: Test with nox
9090
needs: ["nox"]
91+
# We skip this job only if nox was also skipped
92+
if: always() && needs.nox.result != 'skipped'
9193
runs-on: ubuntu-20.04
94+
env:
95+
DEPS_RESULT: ${{ needs.nox.result }}
9296
steps:
93-
- name: Return true
94-
run: "true"
97+
- name: Check matrix job result
98+
run: test "$DEPS_RESULT" = "success"
9599

96100
nox-cross-arch:
97101
name: Cross-arch tests with nox
@@ -202,10 +206,14 @@ jobs:
202206
# The job name should match the name of the `nox-cross-arch` job.
203207
name: Cross-arch tests with nox
204208
needs: ["nox-cross-arch"]
209+
# We skip this job only if nox-cross-arch was also skipped
210+
if: always() && needs.nox-cross-arch.result != 'skipped'
205211
runs-on: ubuntu-20.04
212+
env:
213+
DEPS_RESULT: ${{ needs.nox-cross-arch.result }}
206214
steps:
207-
- name: Return true
208-
run: "true"
215+
- name: Check matrix job result
216+
run: test "$DEPS_RESULT" = "success"
209217

210218
build:
211219
name: Build distribution packages

0 commit comments

Comments
 (0)