Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This is the log of notable changes to EAS CLI and related packages.

- [build-tools] Set the artifact kind for Argent session artifacts from the MIME type reported by the tool server, so screenshots and screen recordings are grouped and labelled on the simulator session page instead of appearing in an unclassified file list. ([#4154](https://github.com/expo/eas-cli/pull/4154) by [@szdziedzic](https://github.com/szdziedzic))
- [build-tools] Load local functions declaring `command` or `path`, so custom build functions moved from `.eas/build` configs into `.eas/functions` can be called from workflows. ([#4096](https://github.com/expo/eas-cli/pull/4096) by [@sswrk](https://github.com/sswrk))
- [eas-cli] Validate local functions declaring `command` or `path` referenced from workflows, including that the module directory of a `path` function exists. ([#4098](https://github.com/expo/eas-cli/pull/4098) by [@sswrk](https://github.com/sswrk))

### 🐛 Bug fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,24 @@ describe(validateWorkflowLocalFunctionsAsync, () => {
validateWorkflowLocalFunctionsAsync(workflow, projectDir)
).resolves.toBeUndefined();
});

it('validates a referenced single-step command function', async () => {
const projectRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-workflow-functions-command-'));
await makeProjectWithCompositeFunctionAsync(
projectRoot,
'say-hi',
['inputs:', ' - name', 'command: echo "Hi, ${ inputs.name }!"'].join('\n')
);
const workflow = {
jobs: {
job: {
steps: [{ uses: './.eas/functions/say-hi', with: { name: 'World' } }],
},
},
};

await expect(
validateWorkflowLocalFunctionsAsync(workflow, projectRoot)
).resolves.toBeUndefined();
});
});
Loading