Documentation
¶
Overview ¶
Package ci holds regression tests for the parts of the GitHub Actions workflows that decide which end-to-end suites run and which images get built for them. That decision is made in YAML and shell rather than in Go, so it is otherwise untested: a renamed output or a dropped "with:" entry silently turns an opt-in suite into a suite that is never selected, or into one selected without the image it needs.
The helpers here read the real workflow files from the repository, so the tests fail when the workflows change rather than when a copy of them does.
Index ¶
Constants ¶
const ( PRE2ETestingWorkflow = "pr-e2e-testing.yaml" RunE2ETestsWorkflow = "run-e2e-tests.yaml" BuildImagesChartWorkflow = "build-images-and-charts.yaml" )
Workflow paths, relative to this package's directory.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct {
Description string `yaml:"description"`
Required bool `yaml:"required"`
Type string `yaml:"type"`
Default any `yaml:"default"`
}
Input is one workflow_call input declaration.
type Job ¶
type Job struct {
Uses string `yaml:"uses"`
If string `yaml:"if"`
Needs yaml.Node `yaml:"needs"`
With map[string]any `yaml:"with"`
Outputs map[string]string `yaml:"outputs"`
Steps []Step `yaml:"steps"`
}
Job is one workflow job, whether it runs steps or calls another workflow.
type Step ¶
type Step struct {
Name string `yaml:"name"`
ID string `yaml:"id"`
If string `yaml:"if"`
Uses string `yaml:"uses"`
Run string `yaml:"run"`
Env map[string]string `yaml:"env"`
}
Step is one step of a workflow job. Only the fields these tests assert on are modelled; everything else in the file is ignored.
type Workflow ¶
type Workflow struct {
Name string `yaml:"name"`
On struct {
WorkflowCall struct {
Inputs map[string]Input `yaml:"inputs"`
} `yaml:"workflow_call"`
} `yaml:"on"`
Jobs map[string]Job `yaml:"jobs"`
}
Workflow is the subset of a workflow file these tests read.
func LoadWorkflow ¶
LoadWorkflow reads and parses a workflow from .github/workflows.