-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
P0-criticalCritical priority - must fix immediatelyCritical priority - must fix immediatelyarea/ci-cdCI/CD workflow generationCI/CD workflow generationtestingTest coverage and qualityTest coverage and quality
Description
Overview
The WorkflowGenerator class — which renders CI workflows for all consumer repos — has zero test coverage. This is the highest-priority gap in the package. The multi-platform feature (v0.11.0) shipped with no automated verification.
What Needs Tests
P0 — Must Have
-
validate()coverage — 6 validation rules, 0 tested- Missing
dart_sdk, wrong type, missingfeatures, wrong type - Invalid
platformsentries,platformsas non-List - Invalid
secretstype,personal_access_token_secrettype - Empty platforms list (currently silent fallback to ubuntu)
- Missing
-
loadCiConfig()coverage — 5 code paths, 0 tested- File missing → returns null
- Valid JSON without
cisection → returns null - Valid JSON with
cisection → returns Map - Malformed JSON → throws StateError
cinot a Map → throws StateError
-
render()single vs multi-platform — the highest-risk path- No
platformskey → single-platformanalyze-and-testjob on ubuntu platforms: ["ubuntu"]→ same single-platform outputplatforms: ["ubuntu", "macos"]→ multi-platform withanalyze+testmatrixplatforms: ["ubuntu", "macos-arm64", "macos-x64", "windows"]→ 4-platform matrix
- No
-
_preserveUserSections()round-trip — data loss prevention- Non-empty user sections survive regeneration
- Empty user sections stay empty
- Multiple independent sections preserved
-
Backward compatibility — config without
platformsproduces output identical to pre-v0.11.0
P1 — Should Have
- Feature flag combinations (proto, lfs, format_check, analysis_cache, managed_analyze, managed_test)
- Secrets env block rendering with and without secrets
- Sub-packages rendering and filtering
- Rendered YAML is syntactically valid (parse with
package:yaml) - Platform alias mapping (
macos=macos-arm64→macos-latest,macos-x64→macos-15-intel) - Multi-platform: proto/lfs steps only in analyze job, not test matrix
_processTemplatedround-trip idempotency
Acceptance Criteria
-
test/workflow_generator_test.dartcreated with all P0 tests - All P1 tests added
-
dart testpasses from package directory - No existing functionality broken
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0-criticalCritical priority - must fix immediatelyCritical priority - must fix immediatelyarea/ci-cdCI/CD workflow generationCI/CD workflow generationtestingTest coverage and qualityTest coverage and quality