Remove redundant CI documentation and example checks

This commit is contained in:
2026-09-28 01:51:50 +00:00
parent ce91f04974
commit 77201baddf
4 changed files with 49 additions and 20 deletions

View File

@@ -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")