Adjust the demo for easier understanding (#1) #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: iOS UI Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.runs-on }} | |
strategy: | |
matrix: | |
config: | |
# - name: 'iOS 16.4 and 17.2 with Xcode 15.2 on macOS 13' | |
# runs-on: macos-13 | |
# xcode: '15.2' | |
# xcode_name: 'Xcode_15.2.app' | |
# destinations: | | |
# platform=iOS Simulator,name=iPhone 14 Pro,OS=16.4 | |
# platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2 | |
- name: 'Xcode 16.2 on macOS 15' | |
runs-on: macos-15 | |
xcode: '16.2' | |
xcode_name: 'Xcode_16.2.app' | |
destinations: | | |
platform=iOS Simulator,name=iPhone 16 Pro,OS=18.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Select Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: ${{ matrix.config.xcode }} | |
- name: iOS Tests | |
working-directory: TestingHost | |
run: | | |
sudo xcode-select -s /Applications/${{ matrix.config.xcode_name }}/Contents/Developer | |
xcrun simctl list devices | |
sudo xcodebuild -runFirstLaunch | |
sudo xcodebuild -sdk iphonesimulator -version | |
sudo installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target / | |
while IFS= read -r destination; do | |
[ -z "$destination" ] && continue | |
echo "Testing on $destination" | |
xcodebuild test \ | |
-scheme 'TestingHostUITests' \ | |
-destination "$destination" | |
done <<< "${{ matrix.config.destinations }}" |