Skip to content

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

Draft
sswrk wants to merge 1 commit into
mainfrom
szymonswierk/eng-22387-eas-build-job-local-action-schema
Draft

[eas-build-job] Add local action schema and utils#3928
sswrk wants to merge 1 commit 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 and local action references.

How

Introduce the action config schema and shared utilities in @expo/eas-build-job: validation, local reference parsing, transitive catalog building with cycle detection, and safe path resolution within the EAS project root. No runtime behavior changes yet.

Added utilities:

  • ActionConfigZ / validateActionConfig: Zod schema and validator for action.yml
  • parseActionReference, normalizeActionReference, isActionReference, isLocalActionReference: distinguish ./ local actions from built-in uses: values like eas/build
  • collectActionReferencesFromSteps: extract local action refs from a step list
  • buildActionCatalogFromStepsAsync: transitively load actions via injected ActionLoader, with cycle detection
  • resolveLocalActionPath: resolve a local uses: ref to an absolute path within the EAS project root (any ./-prefixed location, not just .eas/actions/)
  • getActionNotFoundError, getActionOutsideProjectError, getActionCycleError, getWorkflowLocalActionsMissingError, getWorkflowLocalActionsCycleError: shared user-facing error copy

Test Plan

Added unit tests.

@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

❌ Patch coverage is 89.53488% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.34%. Comparing base (a848411) to head (d1bbabd).

Files with missing lines Patch % Lines
packages/eas-build-job/src/action.ts 89.42% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3928      +/-   ##
==========================================
+ Coverage   59.28%   59.34%   +0.07%     
==========================================
  Files         935      936       +1     
  Lines       41093    41179      +86     
  Branches     8660     8677      +17     
==========================================
+ Hits        24356    24433      +77     
- Misses      16643    16652       +9     
  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 from 77773ec to d1bbabd Compare July 3, 2026 14:08
@github-actions

github-actions Bot commented Jul 3, 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.

1 participant