Skip to content

Improve support for SwiftUI + SwiftPM example #245

Improve support for SwiftUI + SwiftPM example

Improve support for SwiftUI + SwiftPM example #245

Workflow file for this run

name: CI
on: [pull_request, workflow_dispatch]
env:
xcode_version: "16.4"
jobs:
uikit-tests:
runs-on: macos-15
name: UIKit Tests
timeout-minutes: 30
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@v4
- name: Install required tools
run: |
brew update
brew install xcodegen
- name: Generate UIKit project
run: |
cd Examples/UIKit
xcodegen generate
if [ $? -ne 0 ]; then echo "XcodeGen failed" && exit 1; fi
pod install --verbose
if [ $? -ne 0 ]; then echo "Pod install failed" && exit 1; fi
- name: Build UIKit App
run: |
Scripts/build_app.rb Examples/UIKit/SBTUITestTunnel_UIKit.xcworkspace UIKit
- name: Build UIKit UI Tests
run: |
Scripts/build_uitests.rb Examples/UIKit/SBTUITestTunnel_UIKit.xcworkspace UIKit
- name: Run UIKit UI Tests
run: |
Scripts/run_uitests.rb Examples/UIKit/SBTUITestTunnel_UIKit.xcworkspace UIKit
- name: Collect UI Tests artifacts
uses: actions/upload-artifact@v4
with:
name: SBTUITestTunnel_UIKit_Tests.xcresult
path: UIKit.xcresult
if: success() || failure()
- name: Build UIKit No Swizzling UI Tests
run: |
Scripts/build_uitests.rb Examples/UIKit/SBTUITestTunnel_UIKit.xcworkspace UIKit_NoSwizzlingTests
- name: Run UIKit No Swizzling UI Tests
run: |
Scripts/run_uitests.rb Examples/UIKit/SBTUITestTunnel_UIKit.xcworkspace UIKit_NoSwizzlingTests
- name: Collect no swizzling UI Tests artifacts
uses: actions/upload-artifact@v4
with:
name: SBTUITestTunnel_UIKit_NoSwizzling.xcresult
path: UIKit_NoSwizzlingTests.xcresult
if: success() || failure()
swiftui-tests:
runs-on: macos-15
name: SwiftUI Tests
timeout-minutes: 30
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@v4
- name: Install required tools
run: |
brew update
brew install xcodegen
- name: Generate SwiftUI project
run: |
cd Examples/SwiftUI
xcodegen generate
if [ $? -ne 0 ]; then echo "XcodeGen failed" && exit 1; fi
- name: Build SwiftUI App
run: |
Scripts/build_app.rb Examples/SwiftUI/SBTUITestTunnel_SwiftUI.xcodeproj SwiftUI
- name: Build SwiftUI UI Tests
run: |
Scripts/build_uitests.rb Examples/SwiftUI/SBTUITestTunnel_SwiftUI.xcodeproj SwiftUI
- name: Run SwiftUI UI Tests
run: |
Scripts/run_uitests.rb Examples/SwiftUI/SBTUITestTunnel_SwiftUI.xcodeproj SwiftUI
- name: Collect SwiftUI UI Tests artifacts
uses: actions/upload-artifact@v4
with:
name: SBTUITestTunnel_SwiftUI_Tests.xcresult
path: SwiftUI.xcresult
if: success() || failure()