diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 150d669..f4605a6 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -15,8 +15,13 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v3 - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v + - name: Checkout repository + uses: actions/checkout@v3 + - name: Build and Test + run: | + xcodebuild \ + -project DeviceGuru.xcodeproj \ + -scheme DeviceGuru \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 15,OS=18.1' \ + test || exit 1 diff --git a/DeviceGuru.xcodeproj/project.pbxproj b/DeviceGuru.xcodeproj/project.pbxproj index d7f9aa8..d4ae5ac 100644 --- a/DeviceGuru.xcodeproj/project.pbxproj +++ b/DeviceGuru.xcodeproj/project.pbxproj @@ -23,6 +23,16 @@ OBJ_35 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 1DA792682D15A63D00899406 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = "DeviceGuru::DeviceGuru"; + remoteInfo = DeviceGuru; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ 1D82027E2807F3DE00CB9ECF /* DeviceGuruTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DeviceGuruTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 1D8202802807F3DE00CB9ECF /* DeviceGuruTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceGuruTests.swift; sourceTree = ""; }; @@ -140,6 +150,7 @@ buildRules = ( ); dependencies = ( + 1DA792692D15A63D00899406 /* PBXTargetDependency */, ); name = DeviceGuruTests; productName = DeviceGuruTests; @@ -268,6 +279,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 1DA792692D15A63D00899406 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = "DeviceGuru::DeviceGuru" /* DeviceGuru */; + targetProxy = 1DA792682D15A63D00899406 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 1D8202832807F3DE00CB9ECF /* Debug */ = { isa = XCBuildConfiguration; diff --git a/DeviceGuruTests/HardwareDetailProviderImplementationTests.swift b/DeviceGuruTests/HardwareDetailProviderImplementationTests.swift index 3e912b1..152445f 100644 --- a/DeviceGuruTests/HardwareDetailProviderImplementationTests.swift +++ b/DeviceGuruTests/HardwareDetailProviderImplementationTests.swift @@ -4,12 +4,10 @@ import XCTest @testable import DeviceGuru -// Run Test on iPhone 15 pro - final class HardwareDetailProviderImplementationTests: XCTestCase { func testExample() { let hardwareProvider = HardwareDetailProviderImplementation() - XCTAssertEqual(hardwareProvider.hardwareString, "iPhone16,1") + XCTAssertTrue(hardwareProvider.hardwareString.contains("iPhone")) } }