frontend: gate the Docker build on make check (closes #11) #12
Reference in New Issue
Block a user
Delete Branch "issue-11-frontend-ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #11. The frontend/root
Dockerfileran onlyRUN yarn build, soscript/lintandscript/fmt-check(prettier) never gated CI — only a broken build failed it. (script/cibuild's comment even claimed "the Dockerfile runs make check", which was false.) The backendDockerfile.backendalready runsmake check; nothing covered the frontend's lint/fmt-check.Change (single file,
Dockerfile):apk add ... git->apk add ... git make(build stage needsmake).RUN yarn build->RUN make check— which runsscript/test(yarn build, producingdist/) thenscript/lint+script/fmt-check.dist/is still produced in one build (no redundant rebuild); the final nginx runtime image is unchanged.Verified via a fresh clone (a worktree's
.gitpointer breaksvite'sgit rev-parse, so builds must come from a real checkout — as CI'sactions/checkoutprovides): positivedocker buildsucceeds with in-imagemake checkgreen; a negative test (a prettier-violating but build-valid file) makes the build fail atmake check, confirming CI now goes red on a check regression, not just a broken build.Left open for review (not merged).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.