-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
P2-mediumMedium priorityMedium priorityarea/templateTemplate engine and skeleton filesTemplate engine and skeleton filesenhancementNew feature or requestNew feature or request
Description
Overview
File: `templates/github/workflows/ci.skeleton.yaml`
The skeleton template has two nearly identical blocks: `single_platform` (lines 41-149) and `multi_platform` (lines 151-307). The checkout, git config, dart setup, cache, protobuf, and analysis steps are copy-pasted between them. The only structural difference is that multi-platform splits `analyze` and `test` into separate jobs with a matrix.
Risk
Any bug fix or improvement to a shared step must be made in two places. History shows these drift — it's exactly the kind of duplication that causes "fixed on ubuntu but not on windows" bugs.
Examples of recent or potential drift:
- Cache key format (currently identical, but if one is updated and not the other...)
- Action versions (checkout, setup-dart, cache)
- Git config organization list
- Token handling
Potential Approaches
- Mustache partials — Extract shared step sequences into partial templates
- Programmatic YAML builder — Build the YAML in Dart code, composing shared steps
- Single template with conditional job splitting — More complex Mustache logic but one source of truth
Acceptance Criteria
- Shared steps defined in exactly one place
- Both single-platform and multi-platform paths still produce correct output
- Existing tests (once written per issue #XX) still pass
- Consumer workflows regenerate identically
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2-mediumMedium priorityMedium priorityarea/templateTemplate engine and skeleton filesTemplate engine and skeleton filesenhancementNew feature or requestNew feature or request