Revyl Documentation

Cookbooks

Run existing Maestro iOS flows on Revyl Mac CI

Install Java and Maestro under the job user's home directory, then run your existing iOS flows in a recorded Simulator.

If your repository already runs maestro test flows/, keep that command. The Revyl Mac image has Xcode and an iOS Simulator runtime, but it does not ship Java or Maestro. Install both in the job, without sudo, then boot and install the Simulator app before invoking Maestro.

Set up with an agent

Paste one prompt and your coding agent does the rest.

Setup prompt

Run this repository's existing Maestro iOS flows on a Revyl Mac.

Read https://docs.revyl.com/cookbooks/maestro-ios-revyl-macos.md and follow it. It's the current Revyl guide for this, so prefer it over anything you remember about Revyl.

Keep the existing flow directory and `maestro test` command unchanged. Add the setup steps below, set the project-specific build values, and open the Simulator window so the desktop recording includes it.

You're done when the existing Maestro flow command exits successfully and the Simulator appears in the GitHub Actions computer recording.

Ask me before anything that needs my login or approval.

Workflow

name: Maestro iOS on Revyl Mac

on:
  pull_request:
  workflow_dispatch:

permissions:
  contents: read

env:
  IOS_PROJECT: MyApp.xcodeproj
  IOS_SCHEME: MyApp
  IOS_BUNDLE_ID: com.example.myapp

jobs:
  maestro:
    if: >-
      github.event_name == 'workflow_dispatch' ||
      (github.event_name == 'pull_request' &&
       github.event.pull_request.head.repo.full_name == github.repository)
    runs-on: revyl-macos
    timeout-minutes: 55
    steps:
      - uses: actions/checkout@v4

      - name: Install Java and Maestro under the job user's home
        shell: bash
        run: |
          set -euo pipefail
          jdk_root="$HOME/.local/jdks/temurin-21"
          mkdir -p "$HOME/.local/jdks"
          curl -fsSL 'https://api.adoptium.net/v3/binary/latest/21/ga/mac/aarch64/jdk/hotspot/normal/eclipse' \
            -o "$RUNNER_TEMP/temurin21.tar.gz"
          mkdir -p "$RUNNER_TEMP/temurin21"
          tar -xzf "$RUNNER_TEMP/temurin21.tar.gz" -C "$RUNNER_TEMP/temurin21" --strip-components=1
          rm -rf "$jdk_root"
          mv "$RUNNER_TEMP/temurin21" "$jdk_root"
          export JAVA_HOME="$jdk_root"
          export PATH="$JAVA_HOME/bin:$PATH"
          export MAESTRO_DIR="$HOME/.maestro"
          "$JAVA_HOME/bin/java" -version
          echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
          echo "$JAVA_HOME/bin" >> "$GITHUB_PATH"
          curl -fsSL https://get.maestro.mobile.dev | bash
          echo "$HOME/.maestro/bin" >> "$GITHUB_PATH"
          "$HOME/.maestro/bin/maestro" --version

      - name: Build for iOS Simulator
        run: |
          set -euo pipefail
          xcodebuild \
            -project "$IOS_PROJECT" \
            -scheme "$IOS_SCHEME" \
            -sdk iphonesimulator \
            -configuration Debug \
            -derivedDataPath "$RUNNER_TEMP/DerivedData" \
            build

      - name: Boot Simulator and install the app
        id: simulator
        shell: bash
        run: |
          set -euo pipefail
          device_type=$(xcrun simctl list devicetypes | awk -F '[()]' '/iPhone/{print $2; exit}')
          runtime=$(xcrun simctl list runtimes | sed -n 's/.* - \(com.apple.CoreSimulator.SimRuntime.iOS-[^ ]*\) (available)/\1/p' | head -1)
          test -n "$device_type" && test -n "$runtime"
          udid=$(xcrun simctl create "Revyl CI iPhone" "$device_type" "$runtime")
          xcrun simctl boot "$udid"
          xcrun simctl bootstatus "$udid" -b
          app_path=$(find "$RUNNER_TEMP/DerivedData/Build/Products" -path "*/Debug-iphonesimulator/*.app" -print -quit)
          test -n "$app_path"
          xcrun simctl install "$udid" "$app_path"
          xcrun simctl launch "$udid" "$IOS_BUNDLE_ID"
          open -a Simulator

      - name: Run existing Maestro flows
        run: maestro test flows/

Your flow files stay the same. The setup changes around them because the sealed image does not include Java or Maestro and the job account cannot use passwordless sudo or write to the preinstalled Homebrew tree. The example intentionally follows the current public installers; pin the JDK and Maestro versions in a production workflow when you need reproducible toolchains.

What you see in Revyl

The outer computer recording contains the Mac desktop and the visible Simulator window. Maestro's own output remains in the GitHub Actions log; the Revyl computer activity records the shell commands, not Maestro step markers. The computer page and Sessions list are the place to watch the desktop evidence.

Start with a small pull request before adding this job to a larger matrix. The image provides Xcode and the Simulator; the workflow supplies Java and Maestro under the job user's home directory.

Common failures

  • java is missing: keep the home-directory JDK install before the Maestro installer.
  • maestro is missing: add $HOME/.maestro/bin to GITHUB_PATH; each GitHub Actions step gets the updated path.
  • Flow cannot find the app: confirm the bundle identifier, Simulator install, and the app's launch state.
  • The recording shows no Simulator: keep open -a Simulator and make sure the window is not hidden behind another full-screen app.
  • The installer asks for elevation: do not add sudo; use the home-directory install path.

On this page