Skip to content

ci: smoke-test the library across Expo SDK versions - #55

Draft
vonovak wants to merge 4 commits into
mainfrom
test-expo-compat-action
Draft

vonovak wants to merge 4 commits into
mainfrom
test-expo-compat-action

Conversation

@vonovak

@vonovak vonovak commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Add an expo compatibility workflow that packs the library, generates a blank Expo app per SDK version, installs the tarball, registers the config plugin and runs prebuild + export.

The matrix comes from expo/actions/resolve-expo-versions, and each app is built by expo/actions/build-expo-app. Both actions are still under review in expo/actions#12, so they are referenced from the PR branch on vonovak/actions for now.

Nothing checked that the library still installs, prebuilds and bundles on
a new Expo SDK. Add a workflow that does, on pull requests and weekly.

Every SDK version in the matrix is tested two ways, because they catch
different faults:

- fresh-app creates a blank app and installs the library from a packed
  tarball, the way a new user gets it. Nothing else is installed, so a red
  job points at the library rather than at a lagging dependency.
- example-app bumps the example app in this repo to the target SDK, the
  way an existing user upgrades. This covers the real screens and the full
  dependency tree.

Both then run `expo prebuild` and `expo export`. The version matrix comes
from expo/actions/resolve-expo-versions, and each app is built by
expo/actions/build-expo-app. Both actions are still under review in
expo/actions#12, so they are referenced from the
PR branch on vonovak/actions for now.

Two things worth knowing:

- Pack with npm, not yarn. `yarn pack` also applies .gitignore, which
  holds `build/`, so plugin/build never reached the tarball and prebuild
  failed with `Cannot find module './plugin/build/withThemeControl'`. The
  pack step now asserts the plugin is in the archive.
- example-app disables immutable installs, because `expo install --fix`
  rewrites the lockfile and yarn refuses that when CI is set.

The fresh app renders example/src/SimpleScreen.tsx rather than a CI-only
screen, so the smoke test exercises code the example app also renders.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vonovak
vonovak force-pushed the test-expo-compat-action branch from 022748a to 11b581c Compare August 28, 2026 11:47
vonovak and others added 3 commits August 28, 2026 16:20
The `build` fallback selected a native build on `pull_request`, so all four
jobs compiled native code for changes that could not affect it. Stop at
`prebuild,export` there and let the monthly schedule pay for the rest, which
is the split expo/actions/build-expo-app recommends.

Also:
- Use the action's new `auto` build mode instead of repeating its runner
  ternary here.
- Read the tarball name from `env.TARBALL_NAME` rather than hardcoding it, so
  a rename cannot leave this pointing at a missing file.
- Key the concurrency group on the event too, so a scheduled run and a manual
  dispatch on main stop cancelling each other.
- Move off the actions/* versions GitHub warns about on every run.
- Record the fork reference as a TODO in the file, not only in the PR body.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The prepare and fresh-app jobs duplicated what
expo/actions/.github/workflows/expo-compat.yml now does: pack the
library, upload the tarball, and fan out over SDK versions and runners.
Call the reusable workflow instead.

example-app stays hand-written, because the reusable workflow only
builds blank apps. It resolves its SDK matrix with a one-step job, since
resolve-expo-versions needs no checkout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DWnDmahKVURc7PLMEiw8rA
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DWnDmahKVURc7PLMEiw8rA
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