feat: add make and prettier so repo Makefile targets can run in CI #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
The python template ships a Makefile whose targets are the enforced local gate (
make pre-commit= lint, format, typecheck, test). Any repo that wants CI to run one of those targets, rather than re-spelling the underlying command in YAML, currently cannot: the image has nomake.Concrete case in ModernLeft/agent-api-connectors. A step was added to check that generated CLI docs are current:
It failed on the first run that actually executed it:
The step has since been removed (see acba171) and doc freshness is enforced only locally, because
make pre-commitregenerates the docs before every commit. Restoring server-side enforcement needs the image to change.Ask
Add to general-ci-image:
make— so a workflow can invoke a repo Makefile target instead of duplicating the command in YAML. This is the general one: it benefits any repo, not just this case.prettier— narrower. The docs target runsprettier --write docsover generated Markdown, so without it the CI-side regeneration cannot reproduce the committed files byte for byte and the check fails spuriously. This one pulls in node, so it may not be worth it for a python image.Alternatives considered
Suggested split
makealone is cheap and generally useful, and could land independently.prettieris a bigger call given it means node in a python image, so it is reasonable to say no to that half and leave the docs check as a local-only gate.Resolved differently to the ask, recording why.
make: no. The image supplies tools, not build orchestration. A workflow spells out the commands it needs rather than calling a consumer repo Makefile target. Noted in the Dockerfile, README and CLAUDE.md so it does not get added back later by someone reading this issue.prettier: yes, pinned to 3.8.1 and installed globally so the non-rootappusercan run it. Verified in a local build:docker run --rm general-ci:local prettier --versionprints 3.8.1, andmakeis confirmed absent.Correction to the original report. I wrote that prettier pulls in node, so it may not be worth it for a python image. That was wrong: the base is
node:24-slimand node is mandatory anyway, because the Forgejo runner executes JS actions with the job container node. Adding prettier costs one npm package, not a runtime.Consequence for the case that prompted this. ModernLeft/agent-api-connectors wanted
make docs-checkin CI. That specific step stays impossible, but the underlying check does not: with prettier in the image the workflow can inline the typer generation, the unescape pass, the prettier pass and thegit diff --exit-code, which is what it should have done in the first place. I will restore it there once a version carrying prettier is published.