diff options
| -rw-r--r-- | .github/workflows/ios.yml | 39 | ||||
| -rw-r--r-- | ios/MullvadVPN.xcodeproj/project.pbxproj | 4 | ||||
| -rw-r--r-- | ios/MullvadVPN/TunnelManager/TunnelManager.swift | 2 |
3 files changed, 14 insertions, 31 deletions
diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 06cc711545..58238ad03a 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -28,19 +28,19 @@ jobs: test: name: Unit tests runs-on: macos-11 - strategy: - matrix: - destination: ['platform=iOS Simulator,OS=13.7,name=iPhone 8'] env: - source_packages_dir: .spm + SOURCE_PACKAGES_PATH: .spm steps: + - name: Install xcbeautify + run: brew install xcbeautify + - name: Checkout repository uses: actions/checkout@v3 - name: Configure cache uses: actions/cache@v3 with: - path: ios/${{ env.source_packages_dir }} + path: ios/${{ env.SOURCE_PACKAGES_PATH }} key: ${{ runner.os }}-spm-${{ hashFiles('ios/**/Package.resolved') }} restore-keys: | ${{ runner.os }}-spm- @@ -78,32 +78,15 @@ jobs: mv Package.resolved.out Package.resolved working-directory: ios/MullvadVPN.xcodeproj/project.xcworkspace/xcshareddata/swiftpm - - name: Run MullvadVPNTests - run: | - xcodebuild test \ - -project MullvadVPN.xcodeproj \ - -scheme MullvadVPNTests \ - -destination "${destination}" \ - -clonedSourcePackagesDirPath "${SOURCE_PACKAGES_PATH}" \ - CODE_SIGN_IDENTITY="" \ - CODE_SIGNING_REQUIRED=NO \ - ONLY_ACTIVE_ARCH=YES - working-directory: ios - env: - destination: ${{ matrix.destination }} - SOURCE_PACKAGES_PATH: ${{ env.source_packages_dir }} - - - name: Run OperationsTests + - name: Run tests run: | - xcodebuild test \ + set -o pipefail && xcodebuild test \ -project MullvadVPN.xcodeproj \ - -scheme OperationsTests \ - -destination "${destination}" \ + -scheme MullvadVPN \ + -skip-testing:MullvadVPNScreenshots \ + -destination "platform=iOS Simulator,OS=13.7,name=iPhone 8" \ -clonedSourcePackagesDirPath "${SOURCE_PACKAGES_PATH}" \ CODE_SIGN_IDENTITY="" \ CODE_SIGNING_REQUIRED=NO \ - ONLY_ACTIVE_ARCH=YES + ONLY_ACTIVE_ARCH=YES | xcbeautify working-directory: ios - env: - destination: ${{ matrix.destination }} - SOURCE_PACKAGES_PATH: ${{ env.source_packages_dir }} diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index 24e2e0448c..73b7b77a3e 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -2870,7 +2870,7 @@ MARKETING_VERSION = 2022.3; PRODUCT_BUNDLE_IDENTIFIER = "$(APPLICATION_IDENTIFIER).PacketTunnel"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PacketTunnel/ObjcBridgingHeader.h"; + SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PacketTunnel/ObjCBridgingHeader.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; @@ -2893,7 +2893,7 @@ MARKETING_VERSION = 2022.3; PRODUCT_BUNDLE_IDENTIFIER = "$(APPLICATION_IDENTIFIER).PacketTunnel"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PacketTunnel/ObjcBridgingHeader.h"; + SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PacketTunnel/ObjCBridgingHeader.h"; SWIFT_VERSION = 5.0; }; name = Release; diff --git a/ios/MullvadVPN/TunnelManager/TunnelManager.swift b/ios/MullvadVPN/TunnelManager/TunnelManager.swift index 9aa731551f..5061230e17 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelManager.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelManager.swift @@ -556,7 +556,7 @@ final class TunnelManager { _ proxyRequest: ProxyURLRequest, completionHandler: @escaping (OperationCompletion<ProxyURLResponse, Error>) -> Void ) throws -> Cancellable { - if let tunnel { + if let tunnel = tunnel { return tunnel.sendRequest(proxyRequest, completionHandler: completionHandler) } else { throw UnsetTunnelError() |
