Skip to main content
mobster ci works in GitLab CI the way it works in GitHub Actions: a Mac of yours is the runner, the checks cover the screens the merge request changed, and one comment on the merge request holds the verdict, the repro steps and the media. GitLab also shows the JUnit results in the merge request’s test widget. CI has the parts both hosts share.

Set it up

From your project’s folder:
When .gitlab-ci.yml already exists, the job goes to .gitlab/mobster.gitlab-ci.yml instead, and mobster ci init prints the line to add:
.gitlab-ci.yml
--host is optional when the origin remote’s URL names GitLab.

The job

.gitlab-ci.yml
  • The job runs only in merge request pipelines, on a runner with the mobster tag.
  • mobster ci run fetches the target branch (CI_MERGE_REQUEST_TARGET_BRANCH_NAME) and runs mobster test pr with --video. The report goes to .mobster/ci/.
  • after_script runs even when a check fails, so the comment always lands.
  • The comment links each frame, GIF and video to its file in the job’s artifacts, and the report to the artifacts’ browser.

The two variables

Add both in Settings › CI/CD › Variables, masked. Leave them unprotected: merge request pipelines run on branches that aren’t protected, and a protected variable never reaches them. Mobster never prints either one.

Your iPhone in GitLab CI

A merge request can edit .gitlab-ci.yml, so the runner’s owner lists the phones it may test in the runner’s own config.toml, which no merge request can change:
~/.gitlab-runner/config.toml
A phone or TestFlight app the runner doesn’t list stops the job before a check runs. gitlab-runner restart picks up the change.
A runner with the shell executor runs each merge request’s code as the runner’s user, on the Mac the phone is plugged into. Use it on projects whose merge requests you trust, with a test phone signed in to a test account.