Files
osmedeus/test/testdata/workflows/nested/template-foreach-module.yaml
T
j3ssie 1403d20a4d feat: add LLM step executor with vision and tool support, event workflow system, and inheritance
- Add LLM executor supporting OpenAI vision, tool calling, embeddings, and structured outputs
- Introduce event emitter/receiver workflows with deduplication and filtering (generate_event functions)
- Add workflow extends/override system enabling inheritance chains and step merge modes
- Update function naming to snake_case across all testdata (fileExists→file_exists, etc.)
- Add comprehensive test fixtures for linter, events, CDN, step dependencies, and extends workflows
2026-01-20 18:23:57 +08:00

49 lines
1.3 KiB
YAML

kind: module
name: template-foreach-module
description: Test template rendering in foreach steps
params:
- name: inputFile
default: "{{Output}}/items-{{TargetSpace}}.txt"
- name: outputDir
default: "{{Output}}/processed-{{TargetSpace}}"
steps:
# Create test input file
- name: create-input
type: bash
command: |
mkdir -p {{outputDir}}
echo -e "item1\nitem2\nitem3" > {{inputFile}}
exports:
input_ready: "true"
# Foreach with templated input path
- name: foreach-with-templates
type: foreach
pre_condition: 'file_exists("{{inputFile}}")'
input: "{{inputFile}}"
variable: item
threads: 2
step:
name: process-item
type: bash
command: |
echo "Processing [[item]] for {{Target}}" >> {{outputDir}}/[[item]].txt
# Verify results
- name: verify-foreach
type: bash
pre_condition: 'file_exists("{{outputDir}}/item1.txt")'
command: |
echo "=== Foreach Verification ==="
echo "Foreach completed for {{Target}}"
echo "inputFile={{inputFile}}"
echo "outputDir={{outputDir}}"
echo "=== Output Directory ==="
ls -la {{outputDir}}/
echo "=== Item1 Contents ==="
cat {{outputDir}}/item1.txt
exports:
foreach_verified: "true"