From 42caec6cf3b8de3748e7635368c008b9e030fe6f Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 24 Jul 2026 08:46:18 +1000 Subject: [PATCH] CI: stop masking a failing notebook build The notebook-build step ends with `mkdir -p` and `cp -u`, so the step's exit code is `cp`'s, not `jb build`'s. `--keep-going` guarantees the .ipynb files exist for `cp` to succeed on, so a failing strict build reported success. `shell: bash -l {0}` is a custom shell spec, so GitHub injects no `-eo pipefail` of its own. This is the last live instance of the pattern across the five editions: lecture-intro.zh-cn and lecture-python.zh-cn already carry the fix, and the .fa and .fr editions are not affected because their builds are the last command in the step. The step's twin, "Build HTML", runs the same `-n -W --keep-going` unmasked and is green, so this bounds what removing the mask can reveal to failures specific to the jupyter custom builder. --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfd58ac..cbfe351 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,12 @@ jobs: - name: Build Download Notebooks (sphinx-tojupyter) shell: bash -l {0} run: | + # `shell: bash -l {0}` is a custom shell spec, so GitHub does not inject + # `-eo pipefail` (it only does that for the bare `shell: bash` shorthand). + # Without this, a failing `jb build` would be masked by the trailing + # mkdir/cp, whose exit code becomes the step's — and `--keep-going` + # guarantees the .ipynb files exist for `cp` to succeed on. + set -eo pipefail jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter -n -W --keep-going mkdir -p _build/html/_notebooks cp -u _build/jupyter/*.ipynb _build/html/_notebooks