[eas-build-job] Add local action schema#3928
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
622179a to
ff953ae
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3928 +/- ##
==========================================
+ Coverage 59.28% 59.28% +0.01%
==========================================
Files 935 936 +1
Lines 41093 41101 +8
Branches 8660 8660
==========================================
+ Hits 24356 24364 +8
Misses 16643 16643
Partials 94 94 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ff953ae to
77773ec
Compare
85cc322 to
244427d
Compare
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
244427d to
e64f37d
Compare
| .record(z.string(), ActionOutputZ) | ||
| .optional() | ||
| .describe('Named outputs exposed by the action to its caller.'), | ||
| runs: z.object({ |
There was a problem hiding this comment.
current steps thing should require using: composite maybe?
There was a problem hiding this comment.
Are we expecting to add more options apart from composite? I'm not sure if there's much value in expecting explicit using: composite vs making it implicit and documenting it.
| export * from './context'; | ||
| export * from './generic'; | ||
| export * from './step'; | ||
| export * from './action'; |
There was a problem hiding this comment.
do we want to call these actions (straight off of GitHub Actions) or functions (borrowing off https://docs.expo.dev/custom-builds/schema/#functions)?
There was a problem hiding this comment.
might be more of a product decision (cc @jonsamp -- those are the reusable… Things from https://linear.app/expo/project/user-functions-reusable-steps-reusable-jobs-reusable-workflows-394b14f18567/overview)
There was a problem hiding this comment.
I'm liking "functions" more and more, this name clearly communicates that it's about reusability, composability, input/output, encapsulation etc. "Action" feels like something more heavy-weight, something that does something significant, which won't always be the case here. Also, in the docs here https://docs.expo.dev/eas/workflows/syntax/#jobsjob_idstepsstepuses we're referencing "a set of built-in reusable functions"
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |

Why
First step toward local actions for EAS Workflows: reusable step groups referenced via
uses:in.eas/workflows/*.yml, similar to GitHub Actions.This PR adds the shared contract in
@expo/eas-build-jobso all consumers agree on action config shape.How
Introduce the action config schema in
@expo/eas-build-job, the single source of truth for the shape of anaction.ymlfile. No runtime behavior changes yet.Added:
ActionConfigZ/ActionConfig: Zod schema and type foraction.yml(inputs, outputs, runs.steps)validateActionConfig: validates a raw action config against the schemaTest Plan
Added unit tests for
validateActionConfig.