Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .eas/workflows/agent-qa-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ jobs:
- uses: eas/install_node_modules
- id: install_agent_device
run: |
npm install -g agent-device@0.10.1
npm install -g agent-device@latest cali@0.4.0-2
- id: install_agent_device_skill
run: |
npx skills add callstackincubator/agent-device --agent codex --skill agent-device -y
- uses: eas/download_build
id: download_build
with:
Expand All @@ -116,10 +119,6 @@ jobs:
run: |
bash ./scripts/agent-qa/provision-android-emulator.sh
- id: run_agent_qa
env:
AGENT_DEVICE_SESSION: qa-android
AGENT_DEVICE_PLATFORM: android
AGENT_DEVICE_SESSION_LOCK: strip
run: |
bash ./scripts/agent-qa/run-and-export.sh "${{ steps.download_build.outputs.artifact_path }}"

Expand Down Expand Up @@ -150,20 +149,16 @@ jobs:
- uses: eas/install_node_modules
- id: install_agent_device
run: |
npm install -g agent-device@0.10.1
npm install -g agent-device@latest cali@0.4.0-2
- id: install_agent_device_skill
run: |
npx skills add callstackincubator/agent-device --agent codex --skill agent-device -y
- uses: eas/download_build
id: download_build
with:
build_id: ${{ env.BUILD_ID }}
extensions: [app]
- id: provision_ios_simulator
run: |
bash ./scripts/agent-qa/provision-ios-simulator.sh
- id: run_agent_qa
env:
AGENT_DEVICE_SESSION: qa-ios
AGENT_DEVICE_PLATFORM: ios
AGENT_DEVICE_SESSION_LOCK: strip
run: |
bash ./scripts/agent-qa/run-and-export.sh "${{ steps.download_build.outputs.artifact_path }}"

Expand Down
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# EAS agent-device demo

This repo is a minimal Expo + CNG example for running AI-assisted Android and iOS QA on EAS Workflows.
This repo is a minimal Expo + CNG example for running AI-assisted Android and iOS QA on EAS Workflows with [`cali`](https://github.com/callstackincubator/cali).

## What it does

- Reuses compatible Android and iOS simulator builds with `fingerprint` + `get-build` + `repack`
- Falls back to a fresh `build` when the fingerprint changes
- Runs a small Node.js QA agent built with the AI SDK `ToolLoopAgent`
- Uses `cali qa` as the mobile QA agent runtime
- Uses `agent-device` to drive the Android app and iOS simulator, take screenshots, and summarize findings
- Posts one combined mobile QA summary back to the GitHub pull request with `github-comment`
- Optionally uploads screenshots to Vercel Blob so the PR comment can link them
Expand All @@ -17,7 +17,8 @@ This repo is a minimal Expo + CNG example for running AI-assisted Android and iO

- [eas.json](./eas.json)
- [.eas/workflows/agent-qa-mobile.yml](./.eas/workflows/agent-qa-mobile.yml)
- [scripts/agent-qa/index.ts](./scripts/agent-qa/index.ts)
- [cali.config.json](./cali.config.json)
- [scripts/agent-qa/run-and-export.sh](./scripts/agent-qa/run-and-export.sh)

## Required setup

Expand All @@ -34,38 +35,39 @@ Optional environment variables for the QA job:
- `QA_MODEL`: Override the default model (`openai/gpt-5.4-mini`)
- `BLOB_READ_WRITE_TOKEN`: Upload screenshots to Vercel Blob and include public links in the PR comment

The repo-level [cali.config.json](./cali.config.json) points Cali at the bundled [`agent-device`](https://www.npmjs.com/package/agent-device) skills under `./node_modules/agent-device/skills`, so CI does not need a separate `~/.agents/skills` setup.

## Local smoke test

```bash
npm install
npx tsc --noEmit
npx cali qa --help
```

The workflow runner writes `section.md`, `status.txt`, and `report.json` to `artifacts/qa/` during execution. Temporary screenshots are written outside the workspace and uploaded to Vercel Blob when configured.
The workflow runner writes `section.md`, `status.txt`, `report.json`, and `cali-context.json` to `artifacts/qa/` during execution. Screenshots are written to `artifacts/qa/screenshots` and uploaded to Vercel Blob when configured.

To execute the runner directly with Node 24, provide the same environment variables the workflow sets:
To execute the QA command directly, provide the same inputs that the workflow uses:

Android:

```bash
AI_GATEWAY_API_KEY=... \
QA_PLATFORM=android \
APP_PATH=/absolute/path/to/app.apk \
APPLICATION_ID=dev.expo.easagentdevice \
BUILD_ID=test-build \
PR_JSON='{"number":1,"title":"Test PR","body":"Smoke test"}' \
node ./scripts/agent-qa/index.ts
./node_modules/.bin/cali qa \
--env local-android \
--artifact /absolute/path/to/app.apk \
--app-id dev.expo.easagentdevice \
--device ci-android \
--prompt "verify the updated welcome title"
```

iOS simulator:

```bash
AI_GATEWAY_API_KEY=... \
QA_PLATFORM=ios \
APP_PATH=/absolute/path/to/MyApp.app \
APPLICATION_ID=dev.expo.easagentdevice \
AGENT_DEVICE_IOS_DEVICE="iPhone 17" \
BUILD_ID=test-build \
PR_JSON='{"number":1,"title":"Test PR","body":"Smoke test"}' \
node ./scripts/agent-qa/index.ts
./node_modules/.bin/cali qa \
--env local-ios \
--artifact /absolute/path/to/MyApp.app \
--app-id dev.expo.easagentdevice \
--device "iPhone 17" \
--prompt "verify the updated welcome title"
```
13 changes: 13 additions & 0 deletions cali.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"skillPaths": [
"./node_modules/agent-device/skills"
],
"commands": {
"qa": {
"extraInstructions": [
"When you need to verify whether text is visible on screen, prefer `snapshot` over `snapshot -i`. Use `snapshot -i` mainly for interactive exploration and choosing refs.",
"When you save screenshots, use short descriptive file names and include matching screenshotLabels so downstream PR comments can label them clearly."
]
}
}
}
Loading
Loading