# Set Up GitHub Actions CI for an Expo App

Yes. An agent writes a workflow that lints, type-checks, runs Jest and exports the web bundle on every pull request of your Expo app, and proves it passes.

[Run this on Rush](https://cloud.getrush.ai/run/add-github-actions-ci/expo/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent reads `package.json`, the lockfile, `app.json`, `app.config.ts`, `jest.config.js` and `tsconfig.json` before writing a line of YAML. In an app generated from the infinitered/ignite boilerplate the manifest pins `expo` 55.0.5, `react-native` 0.83.2 and `react` 19.2.0, requires Node 20 or newer in `engines`, and already has the scripts a workflow needs: `compile` runs `tsc --noEmit -p . --pretty`, `lint:check` runs `eslint .` without the `--fix` that `lint` adds, `test` runs Jest with the `jest-expo` preset and `test/setup.ts`, and `bundle:web` runs `npx expo export --platform web`. The boilerplate ships no lockfile, because the generator writes one, so in a real app the agent takes the package manager from whichever lockfile exists and keys the dependency cache on it. There is no `.github/workflows/` directory in the boilerplate; the repository's own CircleCI config at the root tests the generator, not the app.

The workflow it writes, `.github/workflows/ci.yml`, runs on pull requests and on pushes to the default branch. One job on `ubuntu-latest`: `actions/setup-node` on Node 20 with `cache` set to the package manager and `cache-dependency-path` to the lockfile, a frozen install, then `lint:check`, `compile` and `test` with `CI=true` so Jest runs once and exits. A second job runs `npx expo export --platform web` and uploads `dist/` as an artifact, which proves Metro can bundle the app for web without any Expo account or signing credential. The agent reads `test/setup.ts`, which mocks `react-native`'s `Image`, `i18next` and `expo-localization`, and `test/i18n.test.ts`, which shells out to `grep` over the source to find translation keys, and keeps both runnable: the runner has `grep`, and the mocks need nothing installed.

It leaves two things out on purpose and says so. `test:maestro` drives the app on a simulator with `MAESTRO_APP_ID=com.helloworld`, and the `build:*` scripts call `eas build` with the profiles in `eas.json`; both need a device image or an `EXPO_TOKEN`, so neither belongs in the required job. The workflow carries a commented `eas build --profile preview --non-interactive` step a maintainer can enable once the secret exists. The ESLint config, `.eslintrc.js`, extends `expo`, `plugin:react-native/all` and `prettier` with `import/order` as an error, so a `lint:check` failure on the first run is likely to be existing code; the agent fixes genuine lint errors in the files it touches and otherwise reports them rather than editing app code.

Then it proves the workflow. It pushes the branch, opens the pull request, waits for the run and reads the logs. If a step fails, it fixes the cause, such as a cache path that does not match the lockfile or a Jest worker count that times out on the runner, and pushes again until the checks are green. The pull request lists each step, what it runs, and why the Maestro and EAS steps are not required.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Add GitHub Actions CI to this Expo app. Read package.json, the lockfile, app.json, app.config.ts, jest.config.js, test/setup.ts, tsconfig.json and .eslintrc.js first. Write .github/workflows/ci.yml that runs on pull requests and pushes to the default branch: setup-node on the Node version engines implies, with the cache keyed on the lockfile and the package manager it implies, a frozen install, then the lint:check, compile and test scripts with CI=true. Add a second job that runs npx expo export --platform web and uploads dist as an artifact. Leave Maestro and eas build out of the required jobs, add a commented eas build preview step for when EXPO_TOKEN exists, and explain both in the pull request. Do not change app code except to fix a lint error in a file you touch; report other failures instead. Open a pull request and make the workflow pass on it; if a step fails, fix the cause and push again.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

What comes back is a pull request on its own branch adding `.github/workflows/ci.yml` and nothing else unless a lint fix was needed. The workflow has a `checks` job that installs, lints, type-checks and runs Jest, and a `web-export` job that bundles for web and uploads `dist/`. The description lists each step, the Node version and lockfile it keys on, and the two steps deliberately left out with the secret or simulator each would need.

The checks on the pull request are the proof: the new workflow runs on the branch that adds it, and the agent does not stop until it is green. The session transcript, at `GET /o/{org}/sessions/{id}/messages`, keeps the local runs of `lint:check`, `compile` and `test` in the sandbox and every push, so a reviewer can see what failed on a first attempt and what changed.

Before merging, a reviewer checks that the Node version matches what the team uses locally, that the cache key is the lockfile the repository commits, and that the web export job is wanted on every pull request rather than only on the default branch. A follow-up to the same session adjusts triggers, adds the EAS step with a secret, or splits the jobs on the same branch.

## Run it on every new repository

Start one run per app without CI from your own server: `POST /o/{org}/sessions` with this prompt and that repository in `resources`, one call each. `GET /o/{org}/github` lists every repository the Rush GitHub App installation can reach, so a script can find the ones with no `.github/workflows/` directory and start a run for each. Each run has its own sandbox and its own branch.

Give the key a `webhook_url` and each run POSTs `run.completed` with its `session_url` when the turn finishes, so the pull request links collect on your side without polling. A key may have at most `max_concurrent` runs in progress at once, 4 by default, and starting one more answers `202` with `status: "queued"`, so a script over many Expo apps can send them all and read each result by webhook as the queued runs start and finish.

## Why run it on Rush?

Writing a React Native workflow by hand usually means a few rounds of pushing, waiting and reading runner logs: the cache path is wrong, Jest hangs in watch mode without `CI=true`, or the export step needs a flag. Each round costs attention on a laptop. In a Rush sandbox the agent runs the scripts first, then does the push-and-read loop itself, and your branch only sees the version that passed.

The result is a workflow with its own run attached, not a YAML file to try later. Everything that was left out is named with the reason, so adding EAS builds or Maestro later is a decision rather than an archaeology exercise. And several apps can be onboarded at once, each in its own sandbox and pull request.

## Frequently asked questions

### Which package manager will the workflow use?

The one the lockfile implies: `pnpm-lock.yaml`, `yarn.lock`, `package-lock.json` or `bun.lock`. The boilerplate itself ships none, since the generator writes one when it creates the app, so the agent reads yours. The `cache` input on `setup-node` and the install command follow from that choice.

### Why is there no EAS build in the required checks?

`eas build` needs an `EXPO_TOKEN` secret and, for iOS, Apple credentials, and a native build takes far longer than the lint and test steps. The workflow carries a commented preview-profile step so a maintainer can turn it on once the secret exists, and the pull request explains it. The web export job gives a real bundling check in the meantime without any credential.

### Will the existing tests run on the runner?

Yes. `jest.config.js` uses the `jest-expo` preset and `test/setup.ts` mocks the native modules the components touch, so `Text.test.tsx` renders under `@testing-library/react-native` without a device. `test/i18n.test.ts` runs `grep` through `child_process` to find translation keys in the source, which works on an Ubuntu runner.

### What about the Maestro end-to-end flows?

The flows under `.maestro/flows/` need a built app on a simulator or emulator, which a plain Ubuntu runner does not provide. The agent leaves `test:maestro` out of the required job and says so. Running them in CI means a macOS runner with a simulator or a device cloud, which is a separate change the agent can make in a follow-up if you ask.

### Does the agent change my app code?

Only to fix a lint error in a file it has to touch, which for a workflow-only change is normally nothing. If `lint:check` or `compile` fails on existing code, the pull request reports the files and errors instead of editing them, so the first CI run tells the truth about the repository.

## More Expo jobs

- [Add i18n to an Expo App](https://getrush.ai/run/add-i18n/expo/)
- [Add Over-the-Air Updates to an Expo App](https://getrush.ai/run/add-ota-updates/expo/)
- [Add Push Notifications to an Expo App from a Linear Issue](https://getrush.ai/run/add-push-notifications/expo/)

## The same job on other stacks

- [Set Up GitHub Actions CI for an Express App](https://getrush.ai/run/add-github-actions-ci/express/)
- [Set Up GitHub Actions CI for a Flask App](https://getrush.ai/run/add-github-actions-ci/flask/)
- [Add GitHub Actions CI to a Flutter App](https://getrush.ai/run/add-github-actions-ci/flutter/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
