diff --git a/act/schema/schema_test.go b/act/schema/schema_test.go index ce571c96..30fc9d13 100644 --- a/act/schema/schema_test.go +++ b/act/schema/schema_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) @@ -90,3 +91,32 @@ jobs: }).UnmarshalYAML(&node) assert.NoError(t, err) } + +func TestWorkflowCallRunsOn(t *testing.T) { + var node yaml.Node + err := yaml.Unmarshal([]byte(` +name: Build Silo Frontend DEV +on: + push: + branches: + - dev + - dev-* +jobs: + build_frontend_dev: + name: Build Silo Frontend DEV + runs-on: ubuntu-latest + container: + image: code.forgejo.org/oci/node:22-bookworm + uses: ./.github/workflows/build.yaml + with: + STAGE: dev + secrets: + PACKAGE_WRITER_TOKEN: ${{ secrets.PACKAGE_WRITER_TOKEN }} +`), &node) + require.NoError(t, err) + n := &Node{ + Definition: "workflow-root", + Schema: GetWorkflowSchema(), + } + require.NoError(t, n.UnmarshalYAML(&node)) +} diff --git a/act/schema/workflow_schema.json b/act/schema/workflow_schema.json index a976259c..dad253d6 100644 --- a/act/schema/workflow_schema.json +++ b/act/schema/workflow_schema.json @@ -1472,6 +1472,11 @@ "type": "non-empty-string", "required": true }, + "runs-on": { + "type": "runs-on", + "required": true + }, + "container": "container", "with": "workflow-job-with", "secrets": "workflow-job-secrets", "needs": "needs",