Expo EAS
Run a project's mobile tests on every EAS build and report the result as a GitHub check.
The Expo EAS integration listens for finished EAS builds. When a build finishes, Autonomy downloads it and runs a project's test case or test plan on an Android emulator. iOS testing is coming soon. If a GitHub repository is linked, the result appears as a GitHub check on the commit.
What it does
- Starts runs when an EAS build finishes, for Android builds, and for iOS builds when iOS testing is available.
- Installs the build itself: an
.apkfor Android, and a simulator.appfor iOS when iOS testing is available. - Posts an
Autonomy QAGitHub check through a linked repository. Expo has no check surface of its own. - Registers the EAS webhook for you when you link an app.
Set up
Before you start
- An Expo account with a project that uses EAS Build.
- An Expo robot access token that can read builds and projects.
- An Autonomy project with an environment for mobile runs.
- A test case or test plan in that project that passes against a mobile build.
- An EAS build profile that makes installable builds (see below).
- For checks: the Autonomy GitHub App installed on the repository.
- Open Organization → Integrations → Expo EAS and click Connect. Paste an Expo robot access token. Expo uses tokens, not a sign-in.
- Click Link app and pick the Expo app to test. Autonomy registers the build webhook.
- Under Project, choose the Autonomy project whose tests these builds run. Changing it later clears the defaults below.
- Under Default test case or plan, choose what runs on each build. Only the project's test cases and test plans are listed.
- Under Default environment, choose the project's environment. Runs use its values and sign-ins, with the new build as the app. Without an environment, builds are skipped.
- Choose the platforms whose builds start runs.
- To get a check on the pull request, turn on Post a GitHub check via linked repository and choose the GitHub repository for checks.
Build profiles
Autonomy needs builds it can install on a simulator or emulator. Add a profile to eas.json:
- iOS (coming soon): set
simulatortotruefor a.appsimulator build. A device.ipacan't be installed on a simulator. - Android: set
buildTypetoapk. An.aabcan't be installed on an emulator.
1{2 "build": {3 "autonomy-e2e": {4 "withoutCredentials": true,5 "ios": {6 "simulator": true7 },8 "android": {9 "buildType": "apk"10 }11 }12 }13}If the webhook isn't registered
The linked app shows Registered automatically when it worked. If the token can't manage webhooks, it shows Webhook — manual setup required with the callback URL instead:
- Click Make a new secret for this command. Autonomy makes a secret and fills in the full
eas webhook:createcommand. - Copy the command now. The secret isn't shown again; make a new one if you lose it, and the old one stops working.
- Run it in your project directory:
eas webhook:create --event BUILD --url <callback-url> --secret <secret>Branch filters
EAS build webhooks don't say which branch a build came from, so Expo links have no branch filters.
Paste an Expo build link
You don't need the integration to test one build. In an environment's Android or iOS target, paste the Expo build page link as the download link. When you save, Autonomy looks up the build and stores its download URL. It checks the account, project, platform, that the build finished and hasn't expired, and the app identifier when Expo provides one.
Autonomy tries the lookup without credentials first, then with your organization's Expo connection if Expo asks for access. If it still can't read the build, connect an Expo account that can, paste the direct download link, or upload the build. Android links must lead to an .apk.
How a run starts
When EAS reports a finished build, Autonomy:
- Finds the linked app and its Autonomy project. Nothing runs if that project is archived.
- Checks the build's platform against the link's platforms.
- Checks the build: an
.aab, an unknown file type or a download link older than 30 days is skipped. - Starts the default test case or test plan in the default environment, with the build as the app.
Each build runs once. A webhook EAS sends twice doesn't start a second run.
The check
With a linked repository, the GitHub check is named after what ran, for example Autonomy QA: Onboarding, and shows a link to each run. It concludes as:
| Conclusion | When |
|---|---|
success | Every run passed. |
failure | A run failed, the runs were cancelled, or they didn't finish within 30 minutes. |
neutral | A run couldn't start, so there is nothing to judge. |
A failed run fails the check, whether its outcome wasn't reached or the agent couldn't show that it was. The summary gives the reason.
To make bugs fail the check too, turn on Fail the check on issues in the project's Settings → Integrations → Pull requests. It's off by default. When it's on, an open Bug that one of the check's runs found or reopened makes the check fail: "Failed: a bug was found". See Pull request testing.
Without a linked repository, results appear only in Autonomy.
EAS Workflows
If you build with EAS Workflows, the build webhook still starts the runs: your workflow only needs to build with a testable profile.
name: Autonomy E2E
on:
push:
branches: ['main']
pull_request:
branches: ['*']
jobs:
build_ios:
name: Build iOS for Autonomy
type: build
params:
platform: ios
profile: autonomy-e2e
build_android:
name: Build Android for Autonomy
type: build
params:
platform: android
profile: autonomy-e2e
# No trigger job: the EAS build webhook starts the runs
# when each build finishes.Start runs yourself instead
To decide exactly when runs start, call the API from a step after the build, instead of linking the app. Use an organization API key, pass the build's download link as the app, and send an idempotencyKey so a retried step doesn't start the runs twice:
/api/v1/run.trigger1{2 "testPlanId": "...",3 "environmentSlug": "staging",4 "platforms": [5 "android"6 ],7 "targets": {8 "android": {9 "packageName": "com.example.app",10 "artifactUrl": "https://expo.dev/artifacts/eas/....apk",11 "sourceMode": "url"12 }13 },14 "branch": "main",15 "idempotencyKey": "eas-build-<build id>"16}1{2 "runIds": [3 "..."4 ],5 "planGroupRunId": "...",6 "environment": {7 "slug": "staging",8 "name": "Staging"9 }10}Send the key as Authorization: Bearer aut_…. Follow each run with run.get until its status is final. See Authentication and Runs and evidence.
Several apps
Link each Expo app on its own. Each link has its own Autonomy project, test plan, environment and platforms. Several apps can share one repository for checks.
Troubleshooting
No run starts when a build finishes
Open the linked app in Autonomy and look at the recent builds. A skipped build says why:
project disabled: the link is turned off.deployment not ready: the build is still running or errored.no default test target: choose a Default test case or plan.- "Choose an environment for this deploy link in Autonomy.": choose a Default environment.
project archived, or a default that is archived or in another project: restore the project or choose new defaults.no build artifact: the build has no download.
If no builds appear at all, check that the webhook shows Registered automatically, or register it by hand as above.
The build doesn't install
- iOS: the profile must set
ios.simulator: true. A device.ipacan't run on a simulator. - Android: the profile must set
android.buildType: "apk". An.aabis skipped withartifact kind aab is not installable.
The file type isn't recognized
The build isn't an .app, .apk, .ipa or .aab, and is skipped with artifact format not recognized: <ext>. Check the build profile.
The download link expired
EAS download links expire after 30 days, and the build is skipped with build artifact expired. Start a new EAS build.
No check appears on the pull request
Check that Post a GitHub check via linked repository is on, that a GitHub repository for checks is chosen, and that the Autonomy GitHub App is installed on it.
Didn’t find it?