---
title: "Run a Mobster check from GitHub Actions | Mobster"
description: "mobster ci init writes the workflow, a Mac of yours runs the checks on each pull request, and one comment shows the verdict, repro steps and video."
canonical: "https://mobster.dev/guides/run-mobster-check-github-actions"
last-updated: "2026-11-13"
---

mobster ci init writes the workflow, a Mac of yours runs the checks on each pull request, and one comment shows the verdict, repro steps and video.

# Run a Mobster check from GitHub Actions

mobster ci init writes the workflow, a Mac of yours runs the checks on each pull request, and one comment shows the verdict, repro steps and video.

```
mobster ci init
```

[Download for Mac](https://mobster.dev/download)

On this page

1. [Set it up](#set-it-up)
2. [What the job does](#what-the-job-does)
3. [What you get on the pull request](#what-you-get-on-the-pull-request)
4. [Add an iPhone](#add-an-iphone)
5. [What it costs and what it doesn’t do](#what-it-costs-and-what-it-doesnt-do)
6. [Questions](#questions)
7. [Sources](#sources)

A pull request changes a screen. Nobody opens the app to look. Mobster closes that gap in the pull request itself: a job on a Mac of yours tests the screens the change touched, and one comment shows the verdict and the steps to repeat each failure.

## Set it up

Run the command above in your project’s folder. It reads the `origin` remote, writes `.github/workflows/mobster.yml` and prints what is left:

```
Wrote .github/workflows/mobster.yml.Next:  1. On the Mac that runs the checks: mobster ci doctor  2. Register it as a self-hosted runner with the label mobster: https://docs.mobster.dev/ci/mac-runner  3. Add ANTHROPIC_API_KEY as a repository secret, for checks with steps.  4. Commit the file and open a pull request.
```

On the runner, `mobster ci doctor` lists what the Mac still needs, one row each: Apple silicon, Xcode, an iOS Simulator runtime, Mobster for Mac in Applications, a plan, sleep settings, automatic login, the runner service and free disk. A row marked `✗` comes with the command that fixes it, such as `sudo pmset -a sleep 0 disksleep 0`, so the Mac never sleeps through a job.

## What the job does

The workflow runs on a runner with the label `mobster`, so your other jobs stay on GitHub’s hosted runners. Three steps matter:

1. `mobster ci run` fetches the pull request’s base branch, then runs `mobster test pr` with video. It builds the app, runs the saved checks that cover the changed screens, and drafts a check for each changed screen that none covers. The step fails when a check fails or couldn’t run.
2. The upload step keeps `.mobster/ci/` as the job’s artifact: `junit.xml`, `pr.json`, the HTML report, frames, GIFs and videos.
3. `mobster ci comment` creates the comment, or updates the one from an earlier push. It never fails the job.

## What you get on the pull request

One comment, updated on every push. Its first line is the count, such as `Mobster checks: 11 passed, 1 failed`, then the changed screens and a table with the check, the device, what it expected and what it found. A failure folds open into a repro: the device, the deep link it opened, the steps it took, the expected and found values, its media and the command that runs it again:

```
mobster test .mobster/checks/paywall.yaml --sim 'iPhone 17 Pro@iOS 26.4'
```

Up to 5 failed checks get a repro. Typed text, email addresses and phone numbers in a step show as `•••`. In the next release, you also see frames for up to 3 checks that don’t pass in your private repository’s comment. These frames stay in your repository ([Frames in the comment](https://docs.mobster.dev/ci#frames-in-the-comment)). You get links to the GIFs and videos in the uploaded report.

In the next release, you also get the verdict as a check named `Mobster` on the pull request. The same step posts it with the job’s own token.

## Add an iPhone

A phone the runner’s owner lists is tested too. The list lives in the runner’s `.env`, which no pull request can change:

```
MOBSTER_RUNNER_DEVICES=Test iPhoneMOBSTER_RUNNER_TESTFLIGHT=com.example.yourapp
```

Then change the run step to `"$MOBSTER" ci run --device "Test iPhone" --testflight com.example.yourapp`. A `--device` the runner doesn’t list stops the job before a check runs. On a phone, a check drives only builds you installed, and its Smart steps never send, buy, post or delete.

## What it costs and what it doesn’t do

There is no per-run or per-device price. Mobster for Mac is free, and the runner is a Mac you already own. Mobster hosts no runners. A check with steps uses your Anthropic key until it passes once, then replays with no model.

The job runs on a self-hosted runner, a Mac of yours with Mobster for Mac in Applications. Mobster doesn’t provide the runner, and the workflow isn’t written for GitHub’s hosted ones.

[Run iOS UI checks in CI without a device farm](https://mobster.dev/blog/ios-ui-checks-ci-no-device-farm) sets up the runner Mac step by step.

## Questions

- ### Does Mobster host runners or phones?
  No. Everything runs on a Mac you own. Mobster charges nothing per run or per device.
- ### Do I need a model key?
  Only for checks with steps, and only until they pass once. Add ANTHROPIC_API_KEY as a repository secret. After a check passes, it replays with no model. A check that only launches your app needs no key.
- ### Can the job test on a real iPhone?
  Yes. List the phone in MOBSTER_RUNNER_DEVICES in the runner's .env file, then pass --device to mobster ci run. A pull request can edit the workflow file, so a phone named only there never reaches the job.
- ### Is it safe on a public repository?
  Not with pull requests from forks. A self-hosted runner runs the code in each pull request, which GitHub's hardening guide explains. Use a private repository, or a runner that only takes your own branches, and a test phone signed in to a test account.
- ### Does it work on GitLab?
  Yes. mobster ci init reads your origin remote and writes the mobster job in .gitlab-ci.yml when the remote is GitLab.

## Sources

- [Mobster docs: Running checks in CI](https://docs.mobster.dev/ci)
- [Mobster docs: A Mac as your runner](https://docs.mobster.dev/ci/mac-runner)
- [GitHub: security hardening for self-hosted runners](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions)

## Read next

## Try it on your own iPhone

[Download for Mac](https://mobster.dev/download) [See pricing](https://mobster.dev/pricing)
