diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 376bd8a..6b66390 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,3 +91,28 @@ jobs: - name: Build example for iOS run: | yarn turbo run build:ios + + - name: Run unit tests swift + run: | + yarn turbo run build:ios + + test-swift: + runs-on: macos-14 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Install cocoapods + run: | + cd example/ios + pod install + env: + NO_FLIPPER: 1 + + - name: Run unit tests swift + run: | + cd example/ios + xcodebuild -workspace TicketmasterIgniteExample.xcworkspace -scheme TicketmasterIgniteExample -destination 'platform=iOS Simulator,name=iPhone 16' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED=NO test \ No newline at end of file diff --git a/example/ios/TestPlan.xctestplan b/example/ios/TestPlan.xctestplan new file mode 100644 index 0000000..309ebaf --- /dev/null +++ b/example/ios/TestPlan.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "56E8F040-1EDF-4F87-9FCA-4B453EDE47E1", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + "testTimeoutsEnabled" : true + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:TicketmasterIgniteExample.xcodeproj", + "identifier" : "00E356ED1AD99517003FC87E", + "name" : "TicketmasterIgniteExampleTests" + } + } + ], + "version" : 1 +} diff --git a/example/ios/TicketmasterIgniteExample.xcodeproj/project.pbxproj b/example/ios/TicketmasterIgniteExample.xcodeproj/project.pbxproj index 24438d3..d66b2f4 100644 --- a/example/ios/TicketmasterIgniteExample.xcodeproj/project.pbxproj +++ b/example/ios/TicketmasterIgniteExample.xcodeproj/project.pbxproj @@ -443,7 +443,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "TicketmasterIgniteExampleTests/TicketmasterIgniteExampleTests-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 6.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TicketmasterIgniteExample.app/TicketmasterIgniteExample"; }; name = Debug; @@ -470,7 +470,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "TicketmasterIgniteExampleTests/TicketmasterIgniteExampleTests-Bridging-Header.h"; - SWIFT_VERSION = 6.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TicketmasterIgniteExample.app/TicketmasterIgniteExample"; }; name = Release;