diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index 3f0ebb5c..bb1dc0b1 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -13,17 +13,19 @@ on: - 'apps/ios/**' jobs: unit-tests: - runs-on: macos-14 + runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: setup run: | - sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer + # Find path of latest installed Xcode version + xcode_path="$(ls -d /Applications/Xcode*.app | sort -V | tail -n1)" + sudo xcode-select -s "${xcode_path}/Contents/Developer" gem install xcpretty - name: Build run: > xcodebuild build-for-testing -workspace apps/ios/GuideDogs.xcworkspace - -scheme Soundscape -destination 'platform=iOS Simulator,name=iPhone 15,OS=18.1' + -scheme Soundscape -destination 'platform=iOS Simulator,name=iPhone 15' CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | tee xcodebuild.log | xcpretty && exit ${PIPESTATUS[0]} - name: uploadlog @@ -34,4 +36,4 @@ jobs: - name: Test run: > xcodebuild test-without-building -workspace apps/ios/GuideDogs.xcworkspace - -scheme Soundscape -destination 'platform=iOS Simulator,name=iPhone 15,OS=18.0' + -scheme Soundscape -destination 'platform=iOS Simulator,name=iPhone 15'