Try to implement cache validation #238
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 tests | |
on: | |
push: | |
branches: [ "main", "parallel-testing" ] | |
pull_request: | |
jobs: | |
parallel-testing: | |
name: Cloned simulator | |
runs-on: macos-14 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Select Xcode version | |
run: sudo xcode-select -switch '/Applications/Xcode_15.3.app' | |
- name: Build & Test | |
env: | |
scheme: 'Client' | |
platform: ${{ 'iOS Simulator' }} | |
timeout-minutes: 20 | |
run: | | |
# Get iPhone 15 iOS 17.4 UUID | |
deviceUUID=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone 15.*\(17\.4\).*' | grep -oE '([[A-F0-9]{4}\-?)*' | head -1 ` | |
echo "deviceUUID: $deviceUUID" | |
set -o pipefail && NSUnbufferedIO=YES xcodebuild -project Client/Client.xcodeproj -scheme Client -sdk 'iphonesimulator' -destination "platform=iOS Simulator,id=$deviceUUID" -parallel-testing-enabled YES -parallel-testing-worker-count 2 test 2>&1 | |
# | xcbeautify --renderer github-actions | |
# - name: Archive cli logs | |
# if: always() | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: cli-logs-clone-simulator | |
# path: Client/logfile.txt | |
single-device-testing: | |
name: Normal simulator | |
runs-on: macos-14 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Select Xcode version | |
run: sudo xcode-select -switch '/Applications/Xcode_15.3.app' | |
- name: Build & Test | |
env: | |
scheme: 'Client' | |
platform: ${{ 'iOS Simulator' }} | |
timeout-minutes: 20 | |
run: | | |
# Get iPhone 15 iOS 17.4 UUID | |
deviceUUID=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone 15.*\(17\.4\).*' | grep -oE '([[A-F0-9]{4}\-?)*' | head -1 ` | |
echo "deviceUUID: $deviceUUID" | |
#run UIUnitTest server | |
set -o pipefail && NSUnbufferedIO=YES xcodebuild -project Client/Client.xcodeproj -scheme Client -sdk 'iphonesimulator' -destination "platform=iOS Simulator,id=$deviceUUID" test 2>&1 | |
# | xcbeautify --renderer github-actions | |
# - name: Archive cli logs | |
# if: always() | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: cli-logs-single-simulator | |
# path: Client/logfile.txt |