iOS Simulator Tests π± workflow (minitap-ai/mobile-use)
The iOS Simulator Tests π± workflow from minitap-ai/mobile-use, explained and optimized by Latchkey.
CI health: B - good
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the iOS Simulator Tests π± workflow from the minitap-ai/mobile-use repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: iOS Simulator Tests π±
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ios-tests:
runs-on: macos-14 # macos-14 includes Xcode 15+ with iOS 17 simulators
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: List available simulators
run: make simulator-list
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
- name: Create and boot iOS Simulator
run: |
# Create a new iOS 17.2 simulator for CI
UDID=$(xcrun simctl create "CI-iPhone-15" "iPhone 15" "iOS17.2")
echo "Created simulator with UDID: $UDID"
# Boot the simulator
xcrun simctl boot $UDID
xcrun simctl bootstatus $UDID -b
echo "Simulator booted successfully"
# Save UDID for make test-ios
echo "$UDID" > .ios_udid
echo "SIMULATOR_UDID=$UDID" >> $GITHUB_ENV
- name: Install Homebrew dependencies
run: |
brew tap facebook/fb
brew install idb-companion
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install Python dependencies
run: make install
- name: Run iOS simulator tests
run: make test-ios
- name: Cleanup
if: always()
run: |
# Shutdown and delete CI simulator
make simulator-down
if [ -n "$SIMULATOR_UDID" ]; then
xcrun simctl delete $SIMULATOR_UDID || true
fiThe same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: iOS Simulator Tests π± on: push: branches: [main] pull_request: branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: ios-tests: runs-on: macos-14 # macos-14 includes Xcode 15+ with iOS 17 simulators timeout-minutes: 30 steps: - name: Checkout code uses: actions/checkout@v5 - name: List available simulators run: make simulator-list - name: Select Xcode version run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer - name: Create and boot iOS Simulator run: | # Create a new iOS 17.2 simulator for CI UDID=$(xcrun simctl create "CI-iPhone-15" "iPhone 15" "iOS17.2") echo "Created simulator with UDID: $UDID" # Boot the simulator xcrun simctl boot $UDID xcrun simctl bootstatus $UDID -b echo "Simulator booted successfully" # Save UDID for make test-ios echo "$UDID" > .ios_udid echo "SIMULATOR_UDID=$UDID" >> $GITHUB_ENV - name: Install Homebrew dependencies run: | brew tap facebook/fb brew install idb-companion - name: Install uv uses: astral-sh/setup-uv@v6 with: enable-cache: true - name: Install Python dependencies run: make install - name: Run iOS simulator tests run: make test-ios - name: Cleanup if: always() run: | # Shutdown and delete CI simulator make simulator-down if [ -n "$SIMULATOR_UDID" ]; then xcrun simctl delete $SIMULATOR_UDID || true fi
What changed
- Cancel superseded runs when a branch or PR gets a newer push.
1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.