mobster ci tests the screens each pull request changed, on simulators and on any iPhone plugged into the runner. Mobster charges nothing per run or per device.
Test every pull request
You need one saved check in.mobster/checks. Test your app writes your first.
1
Write the workflow
From your project’s folder, with the It prints
mobster command from PyPI:Wrote .github/workflows/mobster.yml. and the two steps left. The workflow runs on macos-15, the Mac GitHub hosts, and installs mobster from PyPI. It needs no Mac of yours, no account and no token. GitHub’s hosted Mac is free in a public repository, and in a private one GitHub bills its macOS minutes to your account. GitHub Actions has the workflow line by line.2
Add your key
Add
ANTHROPIC_API_KEY as a repository secret if a check has steps. A launch-only check needs no key.3
Open a pull request
Commit
.github/workflows/mobster.yml, push the branch and open a pull request.Test on your own iPhone
You get this in the next release, not in Mobster for Mac 0.4.0 or Mobster CLI 0.4.4.
1
Write the workflow
From your project’s folder:It reads the
origin remote to pick GitHub or GitLab. In a project with no checks yet, it prints:- On GitLab it writes the
mobsterjob in.gitlab-ci.yml, for a Mac of yours with or without--self-hosted. Follow GitLab CI from here. - With no
originremote, pass the host:mobster ci init --self-hosted --host githubormobster ci init --host gitlab. --device "Test iPhone"also tests on an iPhone plugged into the runner (Your iPhone in CI), so it writes this workflow without--self-hosted.- An existing workflow file stays as it is.
--forcereplaces it.
2
Check the Mac
The runner needs the It changes nothing. On a runner with Mobster for Mac and no iOS Simulator runtime yet, it prints:A
mobster command: from PyPI, or in a signed-in Mobster for Mac. On that Mac:Output
! row is a recommendation and doesn’t stop a job.3
Register the runner
Register the Mac as a self-hosted runner with the label
mobster. A Mac as your runner has the steps, Mac mini setup included.4
Add your key and open a pull request
Add
ANTHROPIC_API_KEY as a repository secret if a check has steps. Commit the workflow file and open a pull request. The job posts the comment.The workflow
You get this in the next release, not in Mobster for Mac 0.4.0 or Mobster CLI 0.4.4.
mobster ci init --self-hosted writes this file for a Mac of yours. It runs on a runner with the mobster label, so your other jobs stay on hosted runners. $MOBSTER is the mobster command inside Mobster for Mac.
.github/workflows/mobster.yml
mobster from PyPI, the workflow runs uvx --python 3.12 --from mobster-cli==0.4.4 mobster where this one runs "$MOBSTER", on a runner with uv (brew install uv). It asks for contents: read and pull-requests: write, and its comment step keeps the comment and the job summary only.
mobster ci runfetches the base branch and runsmobster test prwith--video. It builds the app, runs the saved checks that cover the changed screens, and drafts a check for each changed screen none covers. When it picks no check and the pull request changed a file that feeds the app, it runs every check. The step fails when a check fails, can’t run or needs review (exit codes).- The upload keeps
.mobster/ci/as the job’s artifact:junit.xml,pr.json, the HTML report, frames, GIFs and videos. mobster ci commentcreates the pull request comment, or updates the one from an earlier push, and writes the job summary. It never fails your job.
mobster ci comment also posts the check Mobster (next release) on the head commit with the job’s token (checks: write): the verdict is its conclusion (The check), and the comment is its summary.
The two cache steps keep the steps your checks recorded, so later runs replay them with no model. actions/checkout deletes .mobster/cache/replay, so the job restores it from GitHub’s cache before the checks and saves it after them, even when a check fails. A pull request starts from its own earlier runs, or else from a run on your default branch, such as every check on a schedule. It never reads another pull request’s cache.
The comment
Each push updates the same comment:- A run on one device names it once, after the commit. A run on several gives the table a Device column. A check that replayed says so beside its verdict: Passed, replayed.
- Up to 3 checks that didn’t pass lead the comment: what the check expected and found, the source line your pull request changed, the check line, and the command that runs it again.
- Up to 5 get a folded repro: the device, the deep link, the steps, which side to look at (the app, the check or the environment), the requests and last log lines of the failing step, its media, and the command that runs it on the same device.
- Typed text, email addresses and phone numbers in a step show as
•••. - The frames, GIFs and videos link to the uploaded report. GitHub doesn’t show images from workflow artifacts inside a comment, so the frame itself shows only when
mobster ci commentstores it in your repository (Frames in the comment). - The comment ends with “Tested with Mobster”, linked to mobster.dev (next release).
mobster ci run --no-tested-withleaves it out.
Frames in the comment
You get this in the next release, not in Mobster for Mac 0.4.0 or Mobster CLI 0.4.4.
mobster ci comment stores the frames of the checks that lead your comment in your repository, and the comment shows them.
- Mobster writes 1 commit with no parent under
refs/mobster/frames/<YYYYMMDD>/<head commit>/<frames commit>, through the GitHub API with the job’s token. No branch list shows the ref. Mobster never moves an existing ref, and stores nothing when every check passes. - Only people who can read the repository can open the frames.
--frames autostores simulator frames only, and only when the job’s event says the repository is private. An internal repository counts as public.--frames onalso stores frames in public repositories and frames from your iPhone.--frames offstores none.- GitHub still serves a commit by its SHA after you delete its ref. A frame stored in a public repository stays public, and making a private repository public publishes every frame in it.
- The job needs
contents: write. The workflow checks out withpersist-credentials: false, so the token isn’t left in.git/configfor the steps that build your pull request, though they run in the same job. If your repository gives write tokens to pull requests from forks, setcontents: readand runmobster ci comment --frames off. - Frames are stored only on github.com. The Mobster test action links them in the report instead.
git ls-remote origin 'refs/mobster/frames/*'lists the refs, andgit push origin --delete <ref>deletes one.
Line annotations
You get this in the next release, not in Mobster for Mac 0.4.0 or Mobster CLI 0.4.4.
mobster ci comment and the Mobster test action print 1 annotation for each failure, warning or notice. Source-line annotations also show in the pull request’s Files changed tab:
Your iPhone in CI
A pull request can edit the workflow file, so a phone named only there doesn’t reach it. The runner’s owner lists the phones it may test, and any TestFlight apps, in the runner’s.env file, which no pull request can change:
~/actions-runner/.env
- A
--deviceor--testflightthe runner doesn’t list stops the job before a check runs. Put these flags before--. Restart the runner after you change.env: in~/actions-runner, run./svc.sh stop && ./svc.sh start. - On a phone, a check drives only builds you installed: the device build from this job, a build Xcode installed, or a TestFlight build you named.
- Steps stay in your app, and never send, buy, post or delete on the phone.
- For several phones, list each in
MOBSTER_RUNNER_DEVICESand pass each with--device. Every check runs on every phone. Add--spreadafter--to run each check once, on whichever phone is free (Share the checks between phones). - Keep the phone unlocked, awake and charging. A Mac as your runner has the settings.
Use the Mobster test action
RadishSoftware/test-action runs mobster test pr, uploads the report and keeps the comment in one step. It uses the runner’s mobster, or the one in Mobster for Mac. On GitHub’s hosted Mac (next release), write runs-on: macos-15, and it installs mobster from PyPI with uv.
.github/workflows/mobster.yml
It sets four outputs:
exit-code (0 passed, 1 failed, 2 needs review, 3 couldn’t run), headline, report-dir and artifact-url.
Share the report with your team
With the Team plan, the comment can link your team’s sealed hosted report instead of the job’s artifacts (Share a report with your team).- An Owner or Admin makes an upload key with
POST /api/orgs/$ORG/upload-keysand{"name": "…"}. It prints the secret once,mtk_…. Put your team id and a colon in front of it:<team id>:mtk_…. - Add it to the repository’s secrets as
MOBSTER_TEAM_KEY, and pass it in the test step’senvbesideANTHROPIC_API_KEY.
MOBSTER_TEAM_KEY set, mobster ci run adds --share, and mobster ci comment links the hosted report on GitHub and GitLab. The link holds the report’s key after the #. Opening it needs the link and a signed-in account in the team. An upload key only uploads, and an Owner or Admin revokes it with DELETE /api/orgs/$ORG/upload-keys/$KEY, where $KEY is the key’s id from GET /api/orgs/$ORG/upload-keys.
You get this in the next release, not in Mobster for Mac 0.4.0 or Mobster CLI 0.4.4.
--share uploads only when the CI host says the repository is private: on GitHub Actions, the event’s repository.private is true, and on GitLab, CI_PROJECT_VISIBILITY is private. Otherwise the job’s log says why, and the comment links the job’s artifacts. To share anyway, set MOBSTER_SHARE_LINK_IN_CI: "1" in the step’s env.
Add flags and XCTest
Flags after-- go to mobster test pr. --xctest adds your unit tests, which join the checks in the comment, the JUnit file and the report (Your XCTest targets):
--no-video turns the screen recordings off. CLI: mobster ci lists every flag.
Read the results in other tools
.mobster/ci/junit.xml works with any JUnit reader. GitLab shows it in the merge request. On GitHub, with test-reporter:
flaky=true unless you run with --strict. A quarantined check shows as skipped.
Every check, not only the changed screens
To run every check, on a schedule or onmain, call mobster test in a job of its own:
.github/workflows/nightly.yml
- Each pull request’s first run of the workflow restores the steps this job recorded, and replays each check that passed here on any new build, on the same iOS major version and simulator.
- On a public repository, a pull request from a fork can restore these steps. They hold the labels your checks tapped and the text of the screens they acted on. If those screens show anything private, leave the two cache steps out of this job.
- Point each check’s
app.pathat your build, such as.mobster/build/Build/Products/Debug-iphonesimulator/<App>.app, and build it in a step before the checks. --parallel Nruns N simulators at once. Keep N at or below half the runner’s cores. On a Mac with 8 GB of memory, keep it at 2.
Several machines
--shard I/N splits the checks evenly: run mobster test --shard 1/3, --shard 2/3 and --shard 3/3 on three runners with a matrix strategy, and upload each runner’s folder. An empty shard exits 0.