diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ade21f48..8c046cd7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -352,11 +352,13 @@ jobs: - name: boot simulator and install app run: | # Create a fresh iPhone simulator rather than assuming one is - # pre-created (runner images vary). Pick the newest available - # iPhone device type and iOS runtime. - DEVTYPE=$(xcrun simctl list devicetypes | grep -Eo 'com.apple.CoreSimulator.SimDeviceType.iPhone-[0-9A-Za-z-]+' | tail -1) + # pre-created (runner images vary). Pick the highest-numbered + # iPhone model (e.g. "iPhone 17") so it's compatible with the + # newest iOS runtime — an old model like iPhone 6s is rejected as + # "Incompatible device". + DEVTYPE=$(xcrun simctl list devicetypes | grep -oE 'iPhone [0-9]+' | sort -k2 -n | tail -1) RUNTIME=$(xcrun simctl list runtimes | grep -Eo 'com.apple.CoreSimulator.SimRuntime.iOS-[0-9-]+' | tail -1) - echo "creating simulator: devtype=$DEVTYPE runtime=$RUNTIME" + echo "creating simulator: devtype=\"$DEVTYPE\" runtime=$RUNTIME" UDID=$(xcrun simctl create e2e-iphone "$DEVTYPE" "$RUNTIME") echo "SIM_UDID=$UDID" >> "$GITHUB_ENV" xcrun simctl boot "$UDID" @@ -399,7 +401,8 @@ jobs: - name: run maestro tests run: | source /tmp/e2e-env.sh - maestro --device "$SIM_UDID" test -e APP_ID=tv.aquareum -e SERVER_URL="$SERVER_URL" -e ACCOUNT_HANDLE="$ACCOUNT_HANDLE" .maestro/ + # only one simulator is booted, so maestro auto-selects it + maestro test -e APP_ID=tv.aquareum -e SERVER_URL="$SERVER_URL" -e ACCOUNT_HANDLE="$ACCOUNT_HANDLE" .maestro/ - name: collect ios diagnostics if: always()