Remove redundant CI documentation and example checks
This commit is contained in:
@@ -49,6 +49,33 @@ func TestWoodpeckerWorkflowDependencies(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestVerifyWorkflowUsesFullSuiteWithoutFocusedDuplicates(t *testing.T) {
|
||||
path := filepath.Join(repositoryRoot(t), ".woodpecker", "verify.yml")
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var workflow woodpeckerWorkflow
|
||||
if err := yaml.Unmarshal(data, &workflow); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
tests, ok := workflow.Steps["tests"]
|
||||
if !ok || !containsWorkflowCommand(tests.Commands, "go test ./...") {
|
||||
t.Fatalf("verify workflow lacks the full default suite: %#v", tests)
|
||||
}
|
||||
for name, step := range workflow.Steps {
|
||||
commands := strings.Join(step.Commands, "\n")
|
||||
if strings.Contains(commands, "go test ./internal/doccheck") || strings.Contains(commands, "go test ./internal/config -run") {
|
||||
t.Errorf("verify step %q repeats tests covered by the full suite", name)
|
||||
}
|
||||
}
|
||||
for _, dependency := range []string{"race-tests", "static-analysis", "build"} {
|
||||
if !workflowDependsOn(workflow.Steps, "cross-build", dependency, map[string]bool{}) {
|
||||
t.Errorf("cross-build does not depend on %q", dependency)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestReleaseWorkflowRequiresValidation(t *testing.T) {
|
||||
root := repositoryRoot(t)
|
||||
path := filepath.Join(root, ".woodpecker", "release.yml")
|
||||
|
||||
Reference in New Issue
Block a user