diff --git a/workflow_tests/utils/preGenerateTest.ts b/workflow_tests/utils/preGenerateTest.ts index b1fd99b72794..1e7e7bb04184 100644 --- a/workflow_tests/utils/preGenerateTest.ts +++ b/workflow_tests/utils/preGenerateTest.ts @@ -7,6 +7,8 @@ import {exit} from 'process'; import yaml from 'yaml'; import type {YamlMockJob, YamlWorkflow} from './JobMocker'; +type Step = {name: string; with?: string; envs?: string[]; inputs?: string[]}; + const workflowsDirectory = path.resolve(__dirname, '..', '..', '.github', 'workflows'); const workflowTestsDirectory = path.resolve(__dirname, '..'); const workflowTestMocksDirectory = path.join(workflowTestsDirectory, 'mocks'); @@ -199,7 +201,7 @@ const parseWorkflowFile = (workflow: YamlWorkflow) => { workflowJobs[jobId] = { steps: [], }; - job.steps.forEach((step) => { + job.steps.forEach((step: Step) => { const workflowStep = { name: step.name, inputs: Object.keys(step.with ?? {}), @@ -243,7 +245,7 @@ const getAssertionsFileContent = (jobs: Record): string => Object.entries(jobs).forEach(([jobId, job]) => { let stepAssertionsContent = ''; - job.steps.forEach((step) => { + job.steps.forEach((step: Step) => { stepAssertionsContent += stepAssertionTemplate(step.name, jobId.toUpperCase(), step.name, step.inputs, step.envs); }); const jobAssertionName = `assert${jobId.charAt(0).toUpperCase() + jobId.slice(1)}JobExecuted`;