test: unify container smoke tests and make the fixture exercise the Dockerfiles
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 0
- Forks
- 1
- Avg merge
- 32m
- Merged PRs (30d)
- 3
Description
Three drifted copies of the container smoke test, and a fixture exercising none of the non-trivial Dockerfile behaviour (2026-07 audit). v0.11.0 (#125) shipped most of the fix; items 1-3 remain. containers/quantecon is the full image, containers/quantecon-build the lean one (containers/quantecon-build/README.md:1).
1. The fixture sidesteps the theme and the FreeSerif path
containers/quantecon/tests/minimal-jupyter-book/_config.yml:26 (html_theme: sphinx_book_theme) never imports the quantecon-book-theme both images ship; :28 (fontpkg: "") suppresses the FreeSerif path the .otf-symlink workaround exists to fix.
fontpkg matters most: both Dockerfiles symlink .otf for the FreeFont TTFs because Sphinx's default xelatex fontpkg wants Extension=.otf while Ubuntu ships .ttf (containers/quantecon/Dockerfile:54-61, stated :55-56; containers/quantecon-build/Dockerfile:54-59); emptying it takes the TeX-defaults path, so a symlink regression stays green. test-xelatex.tex:5 sets \setmainfont{DejaVu Serif}, so nothing else loads a FreeFont face through fontspec.
Theme versions can diverge too: full pins quantecon-book-theme==0.21.0 (containers/quantecon/environment.yml:17), lean a floor >=0.21.0 (containers/quantecon-build/environment.yml:66).
Real regression risk: dropping fontpkg can legitimately turn one image's pdflatex build red — the point of the change, so validate before merge (below).
2. test-container.sh is dead code the README still points at
containers/quantecon/tests/test-container.sh: untouched since 2025-11-20 (48d6a92), in no workflow, set -e only (:5, no -W), full image hardcoded at :14, :21, :29, :37 (lean invisible) — superseded by smoke-test.sh in a real container job. But containers/quantecon/README.md:223-228 still gives it as "To run all tests:", :230-234 presents its four steps as the test suite, and :241 demotes it only to an "Older…" entry. Deleting it loses no local Docker path: run-local-tests.sh:31-34 spells out the docker run … smoke-test.sh invocation, caveat HOME=/root so it cannot reproduce #85.
3. run-local-tests.sh drifts from the shared script
run-local-tests.sh:86 (html) and :99 (pdflatex) omit -W --keep-going, which smoke-test.sh:55 and :84 both pass, so a warning-level problem that fails CI passes locally. Align them, or comment that the divergence is deliberate for the macOS host toolchain.
Validating a fixture change (read before item 1)
test-container.yml fires only on workflow_dispatch or a completed Build QuantEcon Containers run (:6-11) — no pull_request trigger, so a fixture PR gets no CI signal. Dispatch on the branch with gh workflow run test-container.yml --ref <your-branch>; checkout uses github.event.workflow_run.head_sha || github.sha (:45), so it tests your fixture against the published :latest images. Otherwise the first signal is post-merge: build-containers.yml rebuilds on a push to main touching containers/**, then Test Container follows.
Not #100 (no automated tests for publish/preview/cache action logic), which stays open for that gap; this issue is the container tests being unable to fail.
Checklist
-
— done in v0.11.0 (#125) ascontainers/tests/smoke-test.sh <image>— pull, marker, xelatex, html, pdflatex, sizecontainers/quantecon/tests/smoke-test.sh(marker:44-45, xelatex:48-50, html:55, pdflatex:84); keep it there, not the proposedcontainers/tests/; pull is now thecontainer:job and size a separate job (test-container.yml:77-101, compressed manifest bytes, not the olddocker imagesfigure) -
Collapse the two— done in v0.11.0 (#125):test-container.ymljobs into a matrix calling it.github/workflows/test-container.yml:22-25matrix overquantecon/quantecon-build,:32-37realcontainer:jobs,:52-53assertsHOME=/github/homeso a silent revert todocker runis caught -
Confirm the lean image now gets a pdflatex build— done in v0.11.0 (#125), shared script:84on both legs -
Fixture: execution on— done in v0.11.0 (#125):minimal-jupyter-book/_config.yml:10execute_notebooks: "force",:16raise_on_error: true;intro.md:33-44numpy/scipy,:48-56pandas,:63-81a real matplotlib PNG,:92-102plotlyto_image; it can still fail —smoke-test.sh:40-42stages a raising cell,:59-78requires red and the sentinel, wired attest-container.yml:61-63withif: always() -
Verify the fixture would have caught the kaleido/Chrome regression from #85— done in v0.11.0 (#125): the plotlyto_imagecell runs in a realcontainer:job, theHOME=/github/homecondition #85 needed -
— done in v0.11.0 (#125):set -euo pipefailinrun-local-tests.sh:5, plus a python/kaleido preflight at:24-42 - Fixture: remove the
fontpkg: ""override at_config.yml:28 - Fixture: switch
_config.yml:26toquantecon_book_theme - Dispatch Test Container on the branch and confirm both images stay green with the fixture change
- Delete
containers/quantecon/tests/test-container.sh - Repoint
containers/quantecon/README.md:223-234atsmoke-test.sh/ the Test Container workflow and drop the:241"Older…" entry - Align
run-local-tests.sh:86and:99with-W --keep-going, or document why the macOS host toolchain differs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the remaining checklist in containers/quantecon/tests/minimal-jupyter-book/_config.yml, then compare containers/quantecon/tests/test-container.sh, smoke-test.sh, run-local-tests.sh, and containers/quantecon/README.md. Read .github/workflows/test-container.yml before changing the fixture, and dispatch it on the branch with gh workflow run test-container.yml --ref . Done means both images pass the fixture, the obsolete script is removed, the README points to the shared workflow, and local flags are aligned or their divergence is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions, shell
- Domain
- build-system, ci-cd, devops, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100