Skip to content

Commit 87fb922

Browse files
authored
CI: stop masking a failing notebook build (#76)
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.
1 parent 34be2ea commit 87fb922

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ jobs:
4040
- name: Build Download Notebooks (sphinx-tojupyter)
4141
shell: bash -l {0}
4242
run: |
43+
# `shell: bash -l {0}` is a custom shell spec, so GitHub does not inject
44+
# `-eo pipefail` (it only does that for the bare `shell: bash` shorthand).
45+
# Without this, a failing `jb build` would be masked by the trailing
46+
# mkdir/cp, whose exit code becomes the step's — and `--keep-going`
47+
# guarantees the .ipynb files exist for `cp` to succeed on.
48+
set -eo pipefail
4349
jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter -n -W --keep-going
4450
mkdir -p _build/html/_notebooks
4551
cp -u _build/jupyter/*.ipynb _build/html/_notebooks

0 commit comments

Comments
 (0)