CI #158
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: CI | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: macos-14 | |
name: Run UI Test on iOS | |
env: | |
xcode_version: "15.2" | |
steps: | |
- name: List Xcode installations | |
run: sudo ls -1 /Applications | grep "Xcode" | |
- name: Select Xcode version ${{ env.xcode_version }} | |
run: | | |
sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app/Contents/Developer | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install required tools | |
run: | | |
brew update | |
brew install xcodegen | |
echo "Downloading mendoza" | |
curl -L https://github.com/Subito-it/Mendoza/releases/download/15.3.0/mendoza.zip -o mendoza.zip | |
unzip mendoza.zip | |
chmod +x mendoza | |
echo "$(pwd)" >> $GITHUB_PATH | |
xcrun simctl list devices | |
- name: Generate projects; | |
run: | | |
cd Example; xcodegen | |
cd SPM; xcodegen | |
- name: Run UI Tests | |
run: | | |
mendoza test --project Example/SBTUITestTunnel.xcworkspace --scheme SBTUITestTunnel --device_name='iPhone 15' --device_runtime='17.2' --local_destination_path=$(pwd) --failure_retry=3 --local_tests_runners=2 | |
- name: Find xcresult directory | |
run: | | |
XCRESULT_PATH=$(find . -name "merged.xcresult" -type d -print -quit) | |
echo "XCRESULT_PATH=$XCRESULT_PATH" >> $GITHUB_ENV | |
- name: Collect UI Tests artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: SBTUITestTunnel_Tests_iOS.xcresult | |
path: ${{ env.XCRESULT_PATH }} | |
if: success() || failure() | |
# - name: Run no swizzling UI Tests | |
# run: | | |
# Scripts/run_uitests_no_swizzling.rb Example/SBTUITestTunnel.xcworkspace | |
# - name: Collect no swizzling UI Tests artifacts | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: SBTUITestTunnel_TestsNoSwizzling_iOS.xcresult | |
# path: SBTUITestTunnel_TestsNoSwizzling.xcresult | |
# if: success() || failure() | |
# - name: Run SPM UI Tests | |
# run: | | |
# ../mendoza test | |
# Scripts/run_uitests.rb Example/SPM/SBTUITestTunnel.xcodeproj |