Skip to content

Commit

Permalink
Test that run action steps without shells fail
Browse files Browse the repository at this point in the history
  • Loading branch information
mpalmer committed Feb 9, 2024
1 parent 01e87d5 commit d064028
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/010_missing_shell_in_action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'missing shell'
description: ''

runs:
using: "composite"
steps:
- name: "say hello"
run: |
echo "Hello world"
1 change: 1 addition & 0 deletions test/010_missing_shell_in_action/exitcode
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
108 changes: 108 additions & 0 deletions test/010_missing_shell_in_action/stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
Validation failed: ValidationState {
action_type: Some(
Action,
),
file_path: Some(
"010_missing_shell_in_action/action.yml",
),
errors: [
OneOf {
code: "one_of",
detail: None,
path: "/runs",
title: "OneOf conditions are not met",
states: [
ValidationState {
action_type: None,
file_path: None,
errors: [
Properties {
code: "properties",
detail: Some(
"Additional property 'steps' is not allowed",
),
path: "/runs",
title: "Property conditions are not met",
},
Enum {
code: "enum",
detail: None,
path: "/runs/using",
title: "Enum conditions are not met",
},
Required {
code: "required",
detail: None,
path: "/runs/main",
title: "This property is required",
},
],
},
ValidationState {
action_type: None,
file_path: None,
errors: [
OneOf {
code: "one_of",
detail: None,
path: "/runs/steps/0",
title: "OneOf conditions are not met",
states: [
ValidationState {
action_type: None,
file_path: None,
errors: [
Required {
code: "required",
detail: None,
path: "/runs/steps/0/shell",
title: "This property is required",
},
],
},
ValidationState {
action_type: None,
file_path: None,
errors: [
Required {
code: "required",
detail: None,
path: "/runs/steps/0/uses",
title: "This property is required",
},
],
},
],
},
],
},
ValidationState {
action_type: None,
file_path: None,
errors: [
Properties {
code: "properties",
detail: Some(
"Additional property 'steps' is not allowed",
),
path: "/runs",
title: "Property conditions are not met",
},
Const {
code: "const",
detail: None,
path: "/runs/using",
title: "Const condition is not met",
},
Required {
code: "required",
detail: None,
path: "/runs/image",
title: "This property is required",
},
],
},
],
},
],
}
1 change: 1 addition & 0 deletions test/010_missing_shell_in_action/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fatal error validating 010_missing_shell_in_action/action.yml

0 comments on commit d064028

Please sign in to comment.