feat: interpolate the step names (#1422)

* feat: interpolate the step names

Step names could contain expressions refering to event data.

Fixes #1353

* test: add missing mock data

* fix: setup composite expression evaluator

The RunContext does contain a cached ExpressionEvaluator.
This should be the case the composite RunContext as well.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Markus Wolf
2022-11-16 22:55:23 +01:00
committed by GitHub
parent e520382d2f
commit 809da7198c
7 changed files with 19 additions and 4 deletions

View File

@@ -249,7 +249,17 @@ func TestNewJobExecutor(t *testing.T) {
sfm := &stepFactoryMock{}
rc := &RunContext{
JobContainer: &jobContainerMock{},
Run: &model.Run{
JobID: "test",
Workflow: &model.Workflow{
Jobs: map[string]*model.Job{
"test": {},
},
},
},
Config: &Config{},
}
rc.ExprEval = rc.NewExpressionEvaluator(ctx)
executorOrder := make([]string, 0)
jim.On("steps").Return(tt.steps)