Skip to content

Commit 1a984f4

Browse files
committed
Add non-interactive mode support to struct-generate workflow and update TemplateRenderer initialization
1 parent c34ec6c commit 1a984f4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/struct-generate.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,17 @@ jobs:
9292
-s ./custom-structures/${{ inputs.custom_structure_path }}
9393
9494
struct generate \
95+
--non-interactive \
9596
-s ./custom-structures/${{ inputs.custom_structure_path }} \
9697
${{ inputs.args }} \
9798
${{ inputs.struct_file }} \
9899
${{ inputs.output_dir }}
99100
else
100101
struct list
101102
102-
struct generate ${{ inputs.args }} \
103+
struct generate \
104+
--non-interactive \
105+
${{ inputs.args }} \
103106
${{ inputs.struct_file }} \
104107
${{ inputs.output_dir }}
105108
fi

tests/test_template_renderer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ def renderer():
99
{"var2": {"type": "string", "default": "default2"}}
1010
]
1111
input_store = "/tmp/input.json"
12-
return TemplateRenderer(config_variables, input_store)
12+
non_interactive = False
13+
return TemplateRenderer(config_variables, input_store, non_interactive=non_interactive)
1314

1415
def test_render_template(renderer):
1516
content = "Hello, {{@ var1 @}}!"

0 commit comments

Comments
 (0)