Repository navigation
Run the frontend container smoke in CI (W4-3) - #90
Merged
Merged
Conversation
Add a frontend-container job that builds the nginx frontend and backend images and runs make test-frontend-container for every scope except docs-only. The compose project is unique per run, attempt and job, the frontend port is ephemeral, and an always() step tears down only that project. Unit tests pin the path trigger, isolation, cleanup and the make target's exit status and teardown.
Owner
Author
Independent review — PASSReviewed exact head: Independent read-only reviewer completed PASS (deleg_ff98c7d0/task-0.log); no blocking findings. Scope is exactly CI workflow plus 28 regression tests. PR/push triggers, non-doc scope, unique Compose project, failure propagation through the existing Make target, and always cleanup are correct. Classifier exercised against 20 relevant paths; none incorrectly skips smoke. No unrelated changes or secrets. Verification on this exact head:
Evidence: wave4/pr-90/checks.json, check.log, github-container-smoke.log, container-smoke.log. Merge only if head and CI remain unchanged/green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New
frontend-containerjob in.github/workflows/ci.yml. It runs the existingmake test-frontend-container, which builds the nginx frontend image and the backend image and then runstests/frontend_proxy/(SPA, REST, WebSocket and/healththrough the nginx proxy). The Makefile, compose file and smoke assertions are unchanged, and so are the existingcheck,frontendandintegrationjobs.Trigger
The job runs when
detect-changesgives any scope exceptdocs(sofrontend,backend,mixed, and an empty or unknown value too). The existing classifier puts every container-relevant path into one of the scopes that run:frontend/**(includingDockerfile,nginx.conf.template,.dockerignore) → frontendsrc/,tests/,content/,pyproject.toml,uv.lock→ backendDockerfile*,docker-compose*.yml,.dockerignore,Makefile,scripts/,.github/→ mixedA change is skipped only if it touches nothing but
docs/**or*.md, and both Docker build contexts leave*.mdout.Isolation and cleanup
COMPOSE_PROJECT_NAME: dnd-fe-smoke-${run_id}-${run_attempt}-${job}. The compose file has nocontainer_name, no named volumes and no fixed image names, so the containers, the network and the built images (<project>-<service>) all belong to this project.FRONTEND_PORT: "0"publishes nginx on an ephemeral host port. The smoke itself reaches nginx over the project network.if: always()step (it also runs on failure or cancel) callsdocker compose ... --profile frontend down --volumes --remove-orphans --rmi local, taking the project from the job env. There is nopruneand no other project is touched.up --exit-code-from frontend-smokestatus after its owndown, so a failing build or smoke fails the step.Tests
tests/unit/test_ci_frontend_container.py(28 tests, runs in under a second):docs; a docs-only change doesalways()cleanup with no prunemake test-frontend-containerrun against a fakedockeron PATH: the exit status followsup(0/1/7), anddownalways runs with the same projectVerification
make check: passed (backend 3074 tests, frontend 387; lint and mypy clean).node:22-alpinefrom Docker Hub returned429 Too Many Requests. So the build failed before any smoke test ran. The make target did exit non-zero (2) and left no containers behind.docker compose configwith the CI env gives the expected project name andpublished: "0".frontend-containerjob is the first real run of the smoke. Check that it passes before merging.