In an EAS workflow, a build job makes the simulator .app or the .apk.
A custom job then downloads the build, boots a device, and runs the suite.
The jobs follow the rules in Mobile jobs.
This page is about EAS Workflows, the CI service. To run tests on hosted simulators and emulators from EAS, see EAS Simulators.
Add an EAS workflow that builds this Expo app and runs its e2e tests on iOS and Android. Docs: https://e2e.tester.army/docs/ci/eas-workflows.md and https://e2e.tester.army/docs/ci.md
- Read both pages.
- Add the
e2ebuild profile toeas.json. - Add
.eas/workflows/e2e.ymland adapt it to this project's targets and Node version. - Ask me to add the model key as a secret EAS environment variable, and set
environment:on each test job to match. - After I start the workflow, read the job logs and fix errors until both jobs pass.
Build profile
Add a build profile that needs no credentials:
Workflow
The Android job needs a nested-virtualization Linux runner, the only EAS
machine that can run the emulator. Use custom jobs, as below. The built-in
maestro job type runs Maestro flows, not e2e.
CI: '1' turns on the CI defaults on a runner that
doesn’t set CI. eas/start_android_emulator is an EAS build function,
documented under custom builds,
not on the Workflows syntax page. It downloads the system image you name
with sdkmanager.
Model key
Keep the model key, such as AI_GATEWAY_API_KEY, in an
EAS environment variable
with secret visibility. Set environment: on each job, because a custom job
reads production by default.
Each job that reads the environment can read the key, including one that runs an untrusted pull request. See Model credentials.
Build less often
A fingerprint job with get-build and repack reuses the last native
build and bundles only the JavaScript. The
agent-device EAS template
does this for both platforms.