Skip to content

ci: run Expo build intelligently — scoped bundle check + reserved native build#1029

Open
kylemcd wants to merge 2 commits into
mainfrom
kyle-kno-14076-make-the-expo-build-ci-run-intelligently-scope-to-dependency
Open

ci: run Expo build intelligently — scoped bundle check + reserved native build#1029
kylemcd wants to merge 2 commits into
mainfrom
kyle-kno-14076-make-the-expo-build-ci-run-intelligently-scope-to-dependency

Conversation

@kylemcd

@kylemcd kylemcd commented Jul 8, 2026

Copy link
Copy Markdown
Member

What & why

The Expo build (expo.yml) ran a full native Android EAS cloud build on every PR, with no path filter — ~10–25 min plus EAS queue/credits, so it was usually stale by the time anyone looked, and it ran on PRs that couldn't possibly affect the Expo/RN packages.

This splits it into two workflows so it runs intelligently — only when something in the Expo/React Native dependency chain changes, and with the cheap-but-effective check on PRs.

Closes KNO-14076.

Dependency chain (the only packages that can break the Expo app)

types → client → react-core → react-native → expo → examples/expo-example

@knocklabs/react (web-only), the other examples, and the *-config packages are not in the chain.

Changes

expo-bundle.yml — per-PR fast check (new)

  • Triggers on pull_request only when the dependency chain changes (path-filtered), plus workflow_dispatch.
  • Replaces the native EAS build with a local expo export (Metro bundle). Because @knocklabs/expo re-exports all of @knocklabs/react-native and both expose a "react-native" export condition pointing at source, Metro bundles the RN/expo source the example renders — so an upstream client/react-core change that breaks how react-native/expo bundle surfaces here.
  • Fully local: no EXPO_TOKEN, no EAS credits, ~2–3 min.

expo-native.yml — full native EAS build, reserved (new)

  • Runs on push to main (path-scoped, post-merge native signal), workflow_dispatch, and PRs labeled expo:native-build (opt-in for a risky PR).
  • Uses the preview EAS profile (internal distribution, no autoIncrement).

expo.yml — removed (superseded by the two above).

Coverage

Break type Caught by
Type/compile error anywhere in react-native/expo (direct or upstream) cicd.yml (build:packages + type:check, every PR — already)
Metro resolution/runtime break in the RN/expo surface the example renders expo-bundle.yml (this PR)
Native-only regression (Expo SDK / native module bumps) expo-native.yml on merge to main (this PR)

Replace the single per-PR native EAS build with two workflows:
- expo-bundle.yml: fast local `expo export` Metro bundle check, path-scoped
  to the types/client/react-core/react-native/expo dependency chain. No
  EXPO_TOKEN or EAS credits.
- expo-native.yml: full native EAS build reserved for push to main,
  workflow_dispatch, and PRs labeled `expo:native-build`.

Closes KNO-14076.
@linear-code

linear-code Bot commented Jul 8, 2026

Copy link
Copy Markdown

KNO-14076

@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 966721d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview, Comment Jul 8, 2026 3:41pm
javascript-nextjs-example Ready Ready Preview, Comment Jul 8, 2026 3:41pm
javascript-slack-connect-example Ready Ready Preview, Comment Jul 8, 2026 3:41pm
javascript-slack-kit-example Ready Ready Preview, Comment Jul 8, 2026 3:41pm

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a610498. Configure here.

Comment thread .github/workflows/expo-native.yml
…n builds

An unrelated `labeled` event on the same PR spun up a run in the same
concurrency group and, via cancel-in-progress, killed an in-flight
opt-in EAS build before its job's if-guard skipped it. Add the label/event
as a group discriminator so only matching runs coalesce.

Addresses comment by @cursor: unrelated labels cancel native build.
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.49%. Comparing base (70e7669) to head (966721d).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1029   +/-   ##
=======================================
  Coverage   64.49%   64.49%           
=======================================
  Files         212      212           
  Lines       10217    10217           
  Branches     1389     1389           
=======================================
  Hits         6589     6589           
  Misses       3603     3603           
  Partials       25       25           

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant