summaryrefslogtreecommitdiffstats
path: root/pkg/model/workflow_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/model/workflow_test.go')
-rw-r--r--pkg/model/workflow_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkg/model/workflow_test.go b/pkg/model/workflow_test.go
index 9f219ee..d253906 100644
--- a/pkg/model/workflow_test.go
+++ b/pkg/model/workflow_test.go
@@ -153,6 +153,25 @@ jobs:
assert.Contains(t, workflow.On(), "pull_request")
}
+func TestReadWorkflow_DecodeNodeError(t *testing.T) {
+ yaml := `
+on:
+ push:
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo
+ env:
+ foo: {{ a }}
+`
+
+ workflow, err := ReadWorkflow(strings.NewReader(yaml))
+ assert.NoError(t, err, "read workflow should succeed")
+ assert.Nil(t, workflow.GetJob("test").Steps[0].GetEnv())
+}
+
func TestReadWorkflow_RunsOnLabels(t *testing.T) {
yaml := `
name: local-action-docker-url