Initial commit

This commit is contained in:
2025-07-30 19:12:53 +03:00
commit 74cbe1e469
83 changed files with 12567 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package internal
import "testing"
func TestValidateActionYML_Required(t *testing.T) {
a := &ActionYML{
Name: "",
Description: "",
Runs: map[string]any{},
}
res := ValidateActionYML(a)
if len(res.MissingFields) == 0 {
t.Error("should detect missing fields")
}
}
func TestValidateActionYML_Valid(t *testing.T) {
a := &ActionYML{
Name: "MyAction",
Description: "desc",
Runs: map[string]any{"using": "node12"},
}
res := ValidateActionYML(a)
if len(res.MissingFields) != 0 {
t.Errorf("expected no missing fields, got %v", res.MissingFields)
}
}