fix: keep generated projects' CI green#4
Merged
Conversation
Generated projects inherited template-only CI that referenced the single-use generator scripts, so their GitHub Actions were red until the owner pruned them by hand. Move the chassis self-tests (template-smoke, package-smoke) out of tests.yml into a dedicated .github/workflows/template-chassis.yml that create-project deletes from the target and the manual setup path removes by hand. Point the code-quality "Check shell syntax" step at `make shell`, whose target already no-ops when the generator scripts are absent, instead of a hardcoded `bash -n` that exited 127 downstream. Guard the invariant in test_create_project.py and record the change in CHANGELOG.md and docs/log.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
Projects generated from this template inherited CI that referenced the template's single-use generator scripts. After
create-projectdeletedscripts/create-projectandscripts/rename-project, three CI things still pointed at them and failed on every push:tests.ymltemplate-smokeranbash scripts/create-project …(deleted) → fail.tests.ymlpackage-smokeasserted the template's own version and built/tested the sdist — a chassis self-test with no meaning downstream.code-quality.yml"Check shell syntax" ranbash -n scripts/create-project scripts/rename-project(both deleted) → exit 127.So every generated project shipped red CI until the owner pruned those by hand.
Fix
template-smokeandpackage-smokemove fromtests.ymlinto a dedicated.github/workflows/template-chassis.yml.tests.ymlkeeps only thepytestjob, which is meaningful in both the template and a generated project.create-projectdeletes the workflow. A clean file removal (added to the existingrm -fline), consistent with how it already drops the single-use files — no fragile in-place YAML surgery.code-quality.ymlnow runsmake shell, whose target already guards with$(wildcard …)and no-ops once the generator scripts are gone.rmlist + layout note andrename-project's printed next-steps now includetemplate-chassis.yml.test_generated_project_ci_has_no_template_only_referencesasserts a generated project has notemplate-chassis.yml, keeps exactly{tests, code-quality, coverage}.yml, and that no surviving workflow references the removed scripts.CHANGELOG.md(Unreleased → Fixed) anddocs/log.md.The
schemas// sdist-include suggestion doesn't apply here — this template has noschemas/dir or non-src test assets missing from the sdist;package-smokeis relocated unchanged.Verification
Full
make checkon this exact tree: ruff, mypy, 68 passed / 2 skipped, coverage 95% (floor 90), okf docs ok. A realcreate-projectrun produced a project whose.github/workflows/holds onlycode-quality.yml,coverage.yml,tests.ymlwith zero references to removed scripts andmake shellas the shell step.🤖 Generated with Claude Code