Skip to content

[eas-build-job] Add local action schema#3928

Open
sswrk wants to merge 2 commits into
mainfrom
szymonswierk/eng-22387-eas-build-job-local-action-schema
Open

[eas-build-job] Add local action schema#3928
sswrk wants to merge 2 commits into
mainfrom
szymonswierk/eng-22387-eas-build-job-local-action-schema

Conversation

@sswrk

@sswrk sswrk commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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-job so 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 an action.yml file. No runtime behavior changes yet.

Added:

  • ActionConfigZ / ActionConfig: Zod schema and type for action.yml (inputs, outputs, runs.steps)
  • validateActionConfig: validates a raw action config against the schema

Test Plan

Added unit tests for validateActionConfig.

@linear-code

linear-code Bot commented Jul 1, 2026

Copy link
Copy Markdown

ENG-22387

sswrk commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.28%. Comparing base (a848411) to head (06676aa).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sswrk sswrk added the no changelog PR that doesn't require a changelog entry label Jul 2, 2026
@sswrk sswrk force-pushed the szymonswierk/eng-22387-eas-build-job-local-action-schema branch from ff953ae to 77773ec Compare July 3, 2026 13:43
@sswrk sswrk changed the title [eas-build-job] Add custom action schema and utils [eas-build-job] Add local action schema and utils Jul 3, 2026
@sswrk sswrk force-pushed the szymonswierk/eng-22387-eas-build-job-local-action-schema branch 4 times, most recently from 85cc322 to 244427d Compare July 3, 2026 15:40
@sswrk sswrk changed the title [eas-build-job] Add local action schema and utils [eas-build-job] Add local action schema Jul 3, 2026
@sswrk sswrk marked this pull request as ready for review July 3, 2026 15:45
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

@sswrk sswrk force-pushed the szymonswierk/eng-22387-eas-build-job-local-action-schema branch from 244427d to e64f37d Compare July 3, 2026 15:48
@sswrk sswrk requested a review from sjchmiela July 3, 2026 15:49
.record(z.string(), ActionOutputZ)
.optional()
.describe('Named outputs exposed by the action to its caller.'),
runs: z.object({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current steps thing should require using: composite maybe?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to call these actions (straight off of GitHub Actions) or functions (borrowing off https://docs.expo.dev/custom-builds/schema/#functions)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Comment thread packages/eas-build-job/src/action.ts Outdated
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants