Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatResult ¶
func FormatResult(result *ValidationResult) string
FormatResult formats a validation result for display
Types ¶
type Job ¶
type Job struct {
Name string // Job name
Needs []string // Dependencies (needs: [job1, job2])
Steps []Step // Steps in the job
}
Job represents a GitHub Actions job
type ValidationResult ¶
type ValidationResult struct {
Pipeline string // Pipeline name (e.g., "ci")
WorkflowFile string // Workflow file path
Success bool // Whether validation passed
MissingInGH []string // Phases in cidx.toml but not in GitHub workflow
MissingInLocal []string // Phases in GitHub workflow but not in cidx.toml
OrderMismatch bool // Whether phase order differs
LocalOrder []string // Order in cidx.toml
GitHubOrder []string // Order in GitHub workflow
}
ValidationResult contains the comparison result between a pipeline and workflow
func ValidateAllWorkflows ¶
func ValidateAllWorkflows(cfg *config.Config, workflowDir string) ([]*ValidationResult, error)
ValidateAllWorkflows validates all pipelines against their corresponding workflows
func ValidateWorkflow ¶
func ValidateWorkflow(cfg *config.Config, pipelineName string, workflowPath string) (*ValidationResult, error)
ValidateWorkflow compares a pipeline definition with a GitHub Actions workflow
type WorkflowDefinition ¶
type WorkflowDefinition struct {
Name string // Workflow name (e.g., "ci", "release")
File string // Workflow file path
Jobs map[string]Job // Jobs defined in the workflow
Phases []string // Extracted phases from "cidx run <phase>" commands
}
WorkflowDefinition represents a GitHub Actions workflow
func ParseWorkflow ¶
func ParseWorkflow(workflowPath string) (*WorkflowDefinition, error)
ParseWorkflow parses a GitHub Actions workflow file and extracts phase information
type WorkflowJobYAML ¶
type WorkflowJobYAML struct {
Name string `yaml:"name"`
Needs interface{} `yaml:"needs"` // Can be string or []string
Steps []WorkflowStepYAML `yaml:"steps"`
}
WorkflowJobYAML represents a job in the workflow YAML
type WorkflowStepYAML ¶
WorkflowStepYAML represents a step in a job
type WorkflowYAML ¶
type WorkflowYAML struct {
Name string `yaml:"name"`
Jobs map[string]WorkflowJobYAML `yaml:"jobs"`
}
WorkflowYAML represents the structure of a GitHub Actions workflow file
Click to show internal directories.
Click to hide internal directories.