From cc9b5e103cd07076721ac801f3a4fae1b4e0cdb9 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:08:08 -0700 Subject: [PATCH 01/35] Script for executing the GPTDriver Tests --- .github/workflows/gptdriverautomation.yml | 122 ++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 .github/workflows/gptdriverautomation.yml diff --git a/.github/workflows/gptdriverautomation.yml b/.github/workflows/gptdriverautomation.yml new file mode 100644 index 000000000..02ab907c3 --- /dev/null +++ b/.github/workflows/gptdriverautomation.yml @@ -0,0 +1,122 @@ +name: iOS Release Build and GPTDriver Tests +on: + workflow_dispatch: {} + +jobs: + BuildAndTestAppOnGPTDriver: # Job name, as chosen + runs-on: macos-latest # macOS runner is required for iOS builds + steps: + # --- Step 1: Extract version from branch name --- + - name: Extract version from branch name + id: extract_version_step + run: | + BRANCH_NAME="${{ github.ref }}" + # Remove 'refs/heads/' prefix (e.g., refs/heads/Release-0.0.0 -> Release-0.0.0) + BRANCH_NAME_WITHOUT_PREFIX="${BRANCH_NAME#refs/heads/}" + # Extract version after "Release-" (e.g., Release-0.0.0 -> 0.0.0) + VERSION=$(echo "$BRANCH_NAME_WITHOUT_PREFIX" | sed -n 's/^Release-\([0-9]*\.[0-9]*\.[0-9]*\)$/\1/p') + + if [ -z "$VERSION" ]; then + echo "Error: Could not extract version from branch name '$BRANCH_NAME_WITHOUT_PREFIX'. Expected format: Release-X.Y.Z" + exit 1 + fi + + echo "Extracted versionName: $VERSION" + echo "VERSION_STRING=$VERSION" >> $GITHUB_ENV + + # Convert semantic version to an integer for CFBundleVersion (versionCode equivalent) + # Example: 1.2.3 -> 102003 (assuming max 2 digits for minor/patch) + # This should be adjusted based on the maximum expected values for major/minor/patch + MAJOR=$(echo "$VERSION" | cut -d. -f1) + MINOR=$(echo "$VERSION" | cut -d. -f2) + PATCH=$(echo "$VERSION" | cut -d. -f3) + + # Calculate versionCode (CFBundleVersion) - ensure this fits in a 32-bit integer + # Standard Android-like conversion: Major * 10000 + Minor * 100 + Patch + # This provides sufficient uniqueness for most common versioning schemes. + VERSION_CODE_INT=$(( MAJOR * 10000 + MINOR * 100 + PATCH )) + echo "Calculated versionCode: $VERSION_CODE_INT" + echo "VERSION_CODE_INT=$VERSION_CODE_INT" >> $GITHUB_ENV + + + # --- Step 2: Checkout the iOS Branch SDK repository --- + - name: Checkout BranchMetrics/ios-branch-deep-linking-attribution (SDK) + uses: actions/checkout@v4 + with: + repository: BranchMetrics/ios-branch-deep-linking-attribution + ref: ${{ github.ref }} # Use the same branch that triggered the workflow + path: ./branch-ios-sdk-repo # Checkout into a subdirectory + + # --- Step 3: Build the iOS Branch SDK Framework --- + - name: Build Branch SDK Framework + run: | + # Build for simulator. Adjust scheme if necessary. + # The output framework will be in build/Debug-iphonesimulator/BranchSDK.framework + xcodebuild build -project Branch-SDK/Branch-SDK.xcodeproj \ + -scheme BranchSDK \ + -configuration Debug \ + -sdk iphonesimulator \ + BUILD_DIR="${{ github.workspace }}/branch-ios-sdk-repo/build" \ + SKIP_INSTALL=NO + working-directory: ./branch-ios-sdk-repo # Run xcodebuild from the SDK's checkout directory + + # --- Step 4: Checkout the iOS Branch Link Simulator App repository --- + - name: Checkout BranchMetrics/BranchLinkSimulator (App) + uses: actions/checkout@v4 + with: + repository: BranchMetrics/BranchLinkSimulator + ref: gptdriver/linkingTests # Checkout the specific app branch + path: ./ios-app-repo # Checkout into another subdirectory + + # --- Step 5: Copy the generated SDK Framework to the App's project --- + - name: Copy generated SDK Framework to App's libs directory + run: | + # Create a 'Frameworks' directory within the app repo for the local SDK + mkdir -p ./ios-app-repo/Frameworks + # Copy the built framework + cp -R ./branch-ios-sdk-repo/build/Debug-iphonesimulator/BranchSDK.framework ./ios-app-repo/Frameworks/ + working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE + + # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- + - name: Build iOS App with local SDK + run: | + # Build the app. Adjust project/workspace, scheme, and destination if necessary. + # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode) + xcodebuild build -project BranchLinkSimulator.xcodeproj \ + -scheme BranchLinkSimulator \ + -configuration Debug \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 15' \ + MARKETING_VERSION=${{ env.VERSION_STRING }} \ + CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} \ + # Adjust Framework Search Paths if your Xcode project doesn't automatically find it + # For example, if you need to point directly to the copied framework: + # FRAMEWORK_SEARCH_PATHS="$(SRCROOT)/Frameworks" + working-directory: ./ios-app-repo # Run xcodebuild from the App's checkout directory + + # --- Step 7: Echo the location of the generated .app bundle --- + - name: Echo .app bundle location + run: | + APP_PATH="./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app" + echo "Generated .app bundle location: $APP_PATH" + # You can also use 'find' to be more dynamic if the name might change + # find ./ios-app-repo/build -name "*.app" + + # --- Step 8: Upload Build Artifacts --- + - name: Upload Build Artifacts + uses: actions/upload-artifact@v4 + with: + name: BranchLinkSimulator-iOS-Debug-Build + path: ./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app + + # --- Step 9: Upload and run tests on GPTDriver service. --- + - name: Run GPTDriver tests + run: | + # Ensure the script is executable + chmod +x ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh + # Execute the script, passing the .app path and platform + bash ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh ./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app ios + env: + API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} + API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design + TEST_TAGS: Release From 174bbd6db9f96e2e352a2cf9c88900a0a055330a Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:13:16 -0700 Subject: [PATCH 02/35] Updated Name --- .../workflows/{gptdriverautomation.yml => gpt-driver-tests.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{gptdriverautomation.yml => gpt-driver-tests.yml} (100%) diff --git a/.github/workflows/gptdriverautomation.yml b/.github/workflows/gpt-driver-tests.yml similarity index 100% rename from .github/workflows/gptdriverautomation.yml rename to .github/workflows/gpt-driver-tests.yml From 8bbf8238394a13d12aa34218522a757040c409e5 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:21:18 -0700 Subject: [PATCH 03/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 137 ++++--------------------- 1 file changed, 21 insertions(+), 116 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 02ab907c3..f1eb14df6 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -1,122 +1,27 @@ -name: iOS Release Build and GPTDriver Tests -on: - workflow_dispatch: {} +name: Placeholder for GPT-tests +# Manually triggered +# $ gh workflow run release.yml +on: + workflow_dispatch: + inputs: + version: + description: Select Release type - major, minor or patch(for version upgrade). + required: true + default: patch + type: choice + options: + - patch + - minor + - major + jobs: - BuildAndTestAppOnGPTDriver: # Job name, as chosen - runs-on: macos-latest # macOS runner is required for iOS builds + static-analysis: + runs-on: macos-latest steps: - # --- Step 1: Extract version from branch name --- - - name: Extract version from branch name - id: extract_version_step - run: | - BRANCH_NAME="${{ github.ref }}" - # Remove 'refs/heads/' prefix (e.g., refs/heads/Release-0.0.0 -> Release-0.0.0) - BRANCH_NAME_WITHOUT_PREFIX="${BRANCH_NAME#refs/heads/}" - # Extract version after "Release-" (e.g., Release-0.0.0 -> 0.0.0) - VERSION=$(echo "$BRANCH_NAME_WITHOUT_PREFIX" | sed -n 's/^Release-\([0-9]*\.[0-9]*\.[0-9]*\)$/\1/p') - - if [ -z "$VERSION" ]; then - echo "Error: Could not extract version from branch name '$BRANCH_NAME_WITHOUT_PREFIX'. Expected format: Release-X.Y.Z" - exit 1 - fi - - echo "Extracted versionName: $VERSION" - echo "VERSION_STRING=$VERSION" >> $GITHUB_ENV - - # Convert semantic version to an integer for CFBundleVersion (versionCode equivalent) - # Example: 1.2.3 -> 102003 (assuming max 2 digits for minor/patch) - # This should be adjusted based on the maximum expected values for major/minor/patch - MAJOR=$(echo "$VERSION" | cut -d. -f1) - MINOR=$(echo "$VERSION" | cut -d. -f2) - PATCH=$(echo "$VERSION" | cut -d. -f3) - - # Calculate versionCode (CFBundleVersion) - ensure this fits in a 32-bit integer - # Standard Android-like conversion: Major * 10000 + Minor * 100 + Patch - # This provides sufficient uniqueness for most common versioning schemes. - VERSION_CODE_INT=$(( MAJOR * 10000 + MINOR * 100 + PATCH )) - echo "Calculated versionCode: $VERSION_CODE_INT" - echo "VERSION_CODE_INT=$VERSION_CODE_INT" >> $GITHUB_ENV - - - # --- Step 2: Checkout the iOS Branch SDK repository --- - - name: Checkout BranchMetrics/ios-branch-deep-linking-attribution (SDK) - uses: actions/checkout@v4 - with: - repository: BranchMetrics/ios-branch-deep-linking-attribution - ref: ${{ github.ref }} # Use the same branch that triggered the workflow - path: ./branch-ios-sdk-repo # Checkout into a subdirectory - - # --- Step 3: Build the iOS Branch SDK Framework --- - - name: Build Branch SDK Framework - run: | - # Build for simulator. Adjust scheme if necessary. - # The output framework will be in build/Debug-iphonesimulator/BranchSDK.framework - xcodebuild build -project Branch-SDK/Branch-SDK.xcodeproj \ - -scheme BranchSDK \ - -configuration Debug \ - -sdk iphonesimulator \ - BUILD_DIR="${{ github.workspace }}/branch-ios-sdk-repo/build" \ - SKIP_INSTALL=NO - working-directory: ./branch-ios-sdk-repo # Run xcodebuild from the SDK's checkout directory - - # --- Step 4: Checkout the iOS Branch Link Simulator App repository --- - - name: Checkout BranchMetrics/BranchLinkSimulator (App) + - name: Check out code uses: actions/checkout@v4 - with: - repository: BranchMetrics/BranchLinkSimulator - ref: gptdriver/linkingTests # Checkout the specific app branch - path: ./ios-app-repo # Checkout into another subdirectory - - # --- Step 5: Copy the generated SDK Framework to the App's project --- - - name: Copy generated SDK Framework to App's libs directory - run: | - # Create a 'Frameworks' directory within the app repo for the local SDK - mkdir -p ./ios-app-repo/Frameworks - # Copy the built framework - cp -R ./branch-ios-sdk-repo/build/Debug-iphonesimulator/BranchSDK.framework ./ios-app-repo/Frameworks/ - working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE - - # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- - - name: Build iOS App with local SDK - run: | - # Build the app. Adjust project/workspace, scheme, and destination if necessary. - # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode) - xcodebuild build -project BranchLinkSimulator.xcodeproj \ - -scheme BranchLinkSimulator \ - -configuration Debug \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15' \ - MARKETING_VERSION=${{ env.VERSION_STRING }} \ - CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} \ - # Adjust Framework Search Paths if your Xcode project doesn't automatically find it - # For example, if you need to point directly to the copied framework: - # FRAMEWORK_SEARCH_PATHS="$(SRCROOT)/Frameworks" - working-directory: ./ios-app-repo # Run xcodebuild from the App's checkout directory - - # --- Step 7: Echo the location of the generated .app bundle --- - - name: Echo .app bundle location + - name: Run static analysis run: | - APP_PATH="./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app" - echo "Generated .app bundle location: $APP_PATH" - # You can also use 'find' to be more dynamic if the name might change - # find ./ios-app-repo/build -name "*.app" + xcodebuild analyze -project BranchSDK.xcodeproj - # --- Step 8: Upload Build Artifacts --- - - name: Upload Build Artifacts - uses: actions/upload-artifact@v4 - with: - name: BranchLinkSimulator-iOS-Debug-Build - path: ./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app - - # --- Step 9: Upload and run tests on GPTDriver service. --- - - name: Run GPTDriver tests - run: | - # Ensure the script is executable - chmod +x ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh - # Execute the script, passing the .app path and platform - bash ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh ./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app ios - env: - API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} - API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design - TEST_TAGS: Release From ffe4f94ac4bd61923ca7e3a3c8a47b417870d9a2 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:26:10 -0700 Subject: [PATCH 04/35] Initial Commit for merging into master. --- .github/workflows/gpt-driver-tests.yml | 75 +++++++++++++++++++------- 1 file changed, 55 insertions(+), 20 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index f1eb14df6..a4663a69d 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -1,27 +1,62 @@ -name: Placeholder for GPT-tests +name: iOS Release Build and GPTDriver Tests -# Manually triggered -# $ gh workflow run release.yml on: - workflow_dispatch: - inputs: - version: - description: Select Release type - major, minor or patch(for version upgrade). - required: true - default: patch - type: choice - options: - - patch - - minor - - major + workflow_dispatch:{} jobs: - static-analysis: - runs-on: macos-latest + BuildAndTestAppOnGPTDriver: # Job name, as chosen + runs-on: macos-latest # macOS runner is required for iOS builds steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Run static analysis + # --- Step 1: Extract version from branch name --- + - name: Extract version from branch name + id: extract_version_step run: | - xcodebuild analyze -project BranchSDK.xcodeproj + BRANCH_NAME="${{ github.ref }}" + # Remove 'refs/heads/' prefix (e.g., refs/heads/Release-0.0.0 -> Release-0.0.0) + BRANCH_NAME_WITHOUT_PREFIX="${BRANCH_NAME#refs/heads/}" + # Extract version after "Release-" (e.g., Release-0.0.0 -> 0.0.0) + VERSION=$(echo "$BRANCH_NAME_WITHOUT_PREFIX" | sed -n 's/^Release-\([0-9]*\.[0-9]*\.[0-9]*\)$/\1/p') + + if [ -z "$VERSION" ]; then + echo "Error: Could not extract version from branch name '$BRANCH_NAME_WITHOUT_PREFIX'. Expected format: Release-X.Y.Z" + exit 1 + fi + + echo "Extracted versionName: $VERSION" + echo "VERSION_STRING=$VERSION" >> $GITHUB_ENV + + # Convert semantic version to an integer for CFBundleVersion (versionCode equivalent) + # Example: 1.2.3 -> 102003 (assuming max 2 digits for minor/patch) + # This should be adjusted based on the maximum expected values for major/minor/patch + MAJOR=$(echo "$VERSION" | cut -d. -f1) + MINOR=$(echo "$VERSION" | cut -d. -f2) + PATCH=$(echo "$VERSION" | cut -d. -f3) + + # Calculate versionCode (CFBundleVersion) - ensure this fits in a 32-bit integer + # Standard Android-like conversion: Major * 10000 + Minor * 100 + Patch + # This provides sufficient uniqueness for most common versioning schemes. + VERSION_CODE_INT=$(( MAJOR * 10000 + MINOR * 100 + PATCH )) + echo "Calculated versionCode: $VERSION_CODE_INT" + echo "VERSION_CODE_INT=$VERSION_CODE_INT" >> $GITHUB_ENV + + # --- Step 2: Checkout the iOS Branch SDK repository --- + - name: Checkout BranchMetrics/ios-branch-deep-linking-attribution (SDK) + uses: actions/checkout@v4 + with: + repository: BranchMetrics/ios-branch-deep-linking-attribution + ref: ${{ github.ref }} # Use the same branch that triggered the workflow + path: ./branch-ios-sdk-repo # Checkout into a subdirectory + + # --- Step 3: Build the iOS Branch SDK Framework --- + - name: Build Branch SDK Framework + run: | + # Build for simulator. Adjust scheme if necessary. + # The output framework will be in build/Debug-iphonesimulator/BranchSDK.framework + xcodebuild build -project Branch-SDK/Branch-SDK.xcodeproj \ + -scheme BranchSDK \ + -configuration Debug \ + -sdk iphonesimulator \ + BUILD_DIR="${{ github.workspace }}/branch-ios-sdk-repo/build" \ + SKIP_INSTALL=NO + working-directory: ./branch-ios-sdk-repo # Run xcodebuild from the SDK's checkout directory From 26fba628a3e9162f896881b701aea283a37474a1 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:28:11 -0700 Subject: [PATCH 05/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index a4663a69d..3a522271f 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -1,7 +1,7 @@ name: iOS Release Build and GPTDriver Tests on: - workflow_dispatch:{} + workflow_dispatch: {} jobs: BuildAndTestAppOnGPTDriver: # Job name, as chosen From 4689ea30d37e2d5fcae7fa77e10b4f10873772e6 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:30:31 -0700 Subject: [PATCH 06/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 3a522271f..8e48cbda8 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -1,7 +1,8 @@ name: iOS Release Build and GPTDriver Tests on: - workflow_dispatch: {} + workflow_dispatch: + inputs: jobs: BuildAndTestAppOnGPTDriver: # Job name, as chosen From a02244f09577935fa019f5835e4ec77bb1f09f0c Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:45:37 -0700 Subject: [PATCH 07/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 8e48cbda8..7384fb514 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -54,10 +54,6 @@ jobs: run: | # Build for simulator. Adjust scheme if necessary. # The output framework will be in build/Debug-iphonesimulator/BranchSDK.framework - xcodebuild build -project Branch-SDK/Branch-SDK.xcodeproj \ - -scheme BranchSDK \ - -configuration Debug \ - -sdk iphonesimulator \ - BUILD_DIR="${{ github.workspace }}/branch-ios-sdk-repo/build" \ - SKIP_INSTALL=NO + xcodebuild build xcodebuild -scheme xcframework \ + BUILD_DIR="${{ github.workspace }}/branch-ios-sdk-repo/build" working-directory: ./branch-ios-sdk-repo # Run xcodebuild from the SDK's checkout directory From 8c2d7931ded29bb21e35a39d910cb902cdba1367 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:46:48 -0700 Subject: [PATCH 08/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 7384fb514..84e8f1e66 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -54,6 +54,6 @@ jobs: run: | # Build for simulator. Adjust scheme if necessary. # The output framework will be in build/Debug-iphonesimulator/BranchSDK.framework - xcodebuild build xcodebuild -scheme xcframework \ + xcodebuild -scheme xcframework \ BUILD_DIR="${{ github.workspace }}/branch-ios-sdk-repo/build" working-directory: ./branch-ios-sdk-repo # Run xcodebuild from the SDK's checkout directory From 0ab2f4e9c28549f11610fe0f02fe99d9015bfd77 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:48:28 -0700 Subject: [PATCH 09/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 84e8f1e66..0b4af596a 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -57,3 +57,64 @@ jobs: xcodebuild -scheme xcframework \ BUILD_DIR="${{ github.workspace }}/branch-ios-sdk-repo/build" working-directory: ./branch-ios-sdk-repo # Run xcodebuild from the SDK's checkout directory + + # --- Step 4: Checkout the iOS Branch Link Simulator App repository --- + - name: Checkout BranchMetrics/BranchLinkSimulator (App) + uses: actions/checkout@v4 + with: + repository: BranchMetrics/BranchLinkSimulator + ref: gptdriver/linkingTests # Checkout the specific app branch + path: ./ios-app-repo # Checkout into another subdirectory + + # --- Step 5: Copy the generated SDK Framework to the App's project --- + - name: Copy generated SDK Framework to App's libs directory + run: | + # Create a 'Frameworks' directory within the app repo for the local SDK + mkdir -p ./ios-app-repo/Frameworks + # Copy the built framework + cp -R ./branch-ios-sdk-repo/build/Debug-iphonesimulator/BranchSDK.framework ./ios-app-repo/Frameworks/ + working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE + + # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- + - name: Build iOS App with local SDK + run: | + # Build the app. Adjust project/workspace, scheme, and destination if necessary. + # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode) + xcodebuild build -project BranchLinkSimulator.xcodeproj \ + -scheme BranchLinkSimulator \ + -configuration Debug \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 15' \ + MARKETING_VERSION=${{ env.VERSION_STRING }} \ + CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} \ + # Adjust Framework Search Paths if your Xcode project doesn't automatically find it + # For example, if you need to point directly to the copied framework: + # FRAMEWORK_SEARCH_PATHS="$(SRCROOT)/Frameworks" + working-directory: ./ios-app-repo # Run xcodebuild from the App's checkout directory + + # --- Step 7: Echo the location of the generated .app bundle --- + - name: Echo .app bundle location + run: | + APP_PATH="./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app" + echo "Generated .app bundle location: $APP_PATH" + # You can also use 'find' to be more dynamic if the name might change + # find ./ios-app-repo/build -name "*.app" + + # --- Step 8: Upload Build Artifacts --- + - name: Upload Build Artifacts + uses: actions/upload-artifact@v4 + with: + name: BranchLinkSimulator-iOS-Debug-Build + path: ./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app + + # --- Step 9: Upload and run tests on GPTDriver service. --- + - name: Run GPTDriver tests + run: | + # Ensure the script is executable + chmod +x ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh + # Execute the script, passing the .app path and platform + bash ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh ./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app ios + env: + API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} + API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design + TEST_TAGS: Release From 16f9d38b610f247cf68eabc2d5f928b6130bdc50 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 23:00:59 -0700 Subject: [PATCH 10/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 0b4af596a..e66ed8832 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -72,7 +72,7 @@ jobs: # Create a 'Frameworks' directory within the app repo for the local SDK mkdir -p ./ios-app-repo/Frameworks # Copy the built framework - cp -R ./branch-ios-sdk-repo/build/Debug-iphonesimulator/BranchSDK.framework ./ios-app-repo/Frameworks/ + cp -R ./branch-ios-sdk-repo/build/BranchSDK.framework ./ios-app-repo/Frameworks/ working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- From 740485447278bdbe9b600657bd1ec9fe18accc8c Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Wed, 8 Oct 2025 23:04:25 -0700 Subject: [PATCH 11/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index e66ed8832..96560f0ad 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -72,7 +72,7 @@ jobs: # Create a 'Frameworks' directory within the app repo for the local SDK mkdir -p ./ios-app-repo/Frameworks # Copy the built framework - cp -R ./branch-ios-sdk-repo/build/BranchSDK.framework ./ios-app-repo/Frameworks/ + cp -R ./branch-ios-sdk-repo/build/BranchSDK.xcframework ./ios-app-repo/Frameworks/ working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- From 1f0e268100791c860174bb30bb260d5b4fb323be Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 00:26:13 -0700 Subject: [PATCH 12/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 96560f0ad..6e3244d50 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -82,9 +82,6 @@ jobs: # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode) xcodebuild build -project BranchLinkSimulator.xcodeproj \ -scheme BranchLinkSimulator \ - -configuration Debug \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15' \ MARKETING_VERSION=${{ env.VERSION_STRING }} \ CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} \ # Adjust Framework Search Paths if your Xcode project doesn't automatically find it From 5bfc4f7726437b967817ddfdc4245498bc78724d Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 00:31:47 -0700 Subject: [PATCH 13/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 6e3244d50..30c5f3970 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -84,6 +84,7 @@ jobs: -scheme BranchLinkSimulator \ MARKETING_VERSION=${{ env.VERSION_STRING }} \ CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} \ + -allowProvisioningUpdates # Adjust Framework Search Paths if your Xcode project doesn't automatically find it # For example, if you need to point directly to the copied framework: # FRAMEWORK_SEARCH_PATHS="$(SRCROOT)/Frameworks" From 1c731e17c7e874d3bf3ce81e7bba1d7917549c60 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 00:40:32 -0700 Subject: [PATCH 14/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 30c5f3970..9ce21ab84 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -80,11 +80,9 @@ jobs: run: | # Build the app. Adjust project/workspace, scheme, and destination if necessary. # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode) - xcodebuild build -project BranchLinkSimulator.xcodeproj \ - -scheme BranchLinkSimulator \ + xcodebuild -scheme BranchLinkSimulator \ MARKETING_VERSION=${{ env.VERSION_STRING }} \ - CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} \ - -allowProvisioningUpdates + CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} # Adjust Framework Search Paths if your Xcode project doesn't automatically find it # For example, if you need to point directly to the copied framework: # FRAMEWORK_SEARCH_PATHS="$(SRCROOT)/Frameworks" From 1d70cb66dbc099682e5fd26ea6f5d2d50b5d682a Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 08:40:46 -0700 Subject: [PATCH 15/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 9ce21ab84..fa53b01a7 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -74,13 +74,34 @@ jobs: # Copy the built framework cp -R ./branch-ios-sdk-repo/build/BranchSDK.xcframework ./ios-app-repo/Frameworks/ working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE + - name: Install the Apple certificate and provisioning profile + env: + BUILD_CERTIFICATE_BASE64: ${{ secrets.BS_BUILD_CERTIFICATE }} + P12_PASSWORD: ${{ secrets.BS_P12_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + # create variables + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + + # import certificate + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH + + # create temporary keychain + security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + + # import certificate to keychain + security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- - name: Build iOS App with local SDK run: | # Build the app. Adjust project/workspace, scheme, and destination if necessary. # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode) - xcodebuild -scheme BranchLinkSimulator \ + xcodebuild -scheme BranchLinkSimulator -allowProvisioningUpdates \ MARKETING_VERSION=${{ env.VERSION_STRING }} \ CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} # Adjust Framework Search Paths if your Xcode project doesn't automatically find it From 76aa7e52b12fb0861e9559f56ad8dd806f55dabf Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 09:18:52 -0700 Subject: [PATCH 16/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index fa53b01a7..93cedbd12 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -78,14 +78,17 @@ jobs: env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BS_BUILD_CERTIFICATE }} P12_PASSWORD: ${{ secrets.BS_P12_PASSWORD }} + BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64 }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision # import certificate echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH + echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH # create temporary keychain security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH @@ -95,6 +98,10 @@ jobs: # import certificate to keychain security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH security list-keychain -d user -s $KEYCHAIN_PATH + + # apply provisioning profile + mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles + cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- - name: Build iOS App with local SDK From eaf5a617e634a681f0b302fe38468c4b9735b1bd Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 10:00:35 -0700 Subject: [PATCH 17/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 93cedbd12..bd0b3da8a 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -100,8 +100,8 @@ jobs: security list-keychain -d user -s $KEYCHAIN_PATH # apply provisioning profile - mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles - cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles + mkdir -p ~/Library/Developer/Xcode/UserData/Provisioning Profiles + cp $PP_PATH ~/Library/Developer/Xcode/UserData/Provisioning Profiles # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- - name: Build iOS App with local SDK From 6b0fc761dbb28d4125e9abe59df6cf0971be9dae Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 10:04:56 -0700 Subject: [PATCH 18/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index bd0b3da8a..20ed8e436 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -100,8 +100,8 @@ jobs: security list-keychain -d user -s $KEYCHAIN_PATH # apply provisioning profile - mkdir -p ~/Library/Developer/Xcode/UserData/Provisioning Profiles - cp $PP_PATH ~/Library/Developer/Xcode/UserData/Provisioning Profiles + mkdir -p ~/Library/Developer/Xcode/UserData/Provisioning\ Profiles + cp $PP_PATH ~/Library/Developer/Xcode/UserData/Provisioning\ Profiles/ # --- Step 6: Build the iOS Branch Link Simulator App using the local SDK Framework --- - name: Build iOS App with local SDK From 79716b926981b123bde42cdd2207132c49894a25 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 10:42:58 -0700 Subject: [PATCH 19/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 20ed8e436..3ef1b34d8 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -78,7 +78,7 @@ jobs: env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BS_BUILD_CERTIFICATE }} P12_PASSWORD: ${{ secrets.BS_P12_PASSWORD }} - BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64 }} + BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AA }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | # create variables @@ -86,9 +86,14 @@ jobs: KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision - # import certificate + # import certificate echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH - echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH + + # Create Provisioning Profiles + echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AA }}" >> part_aa + echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AB }}" >> part_aa + echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AC }}" >> part_aa + base64 --decode part_aa > $PP_PATH # create temporary keychain security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH From 1b488f7d78321b2f1f315fb161d4d1a8f6633fd1 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 9 Oct 2025 10:53:22 -0700 Subject: [PATCH 20/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 3ef1b34d8..3be8ce307 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -93,7 +93,7 @@ jobs: echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AA }}" >> part_aa echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AB }}" >> part_aa echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AC }}" >> part_aa - base64 --decode part_aa > $PP_PATH + base64 -D -i part_aa > $PP_PATH # create temporary keychain security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH From 6b12986ff0eeb63b32df59c2eb0fa6402c7f02c0 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:23:01 -0700 Subject: [PATCH 21/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 3be8ce307..4dfbaa378 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -115,26 +115,23 @@ jobs: # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode) xcodebuild -scheme BranchLinkSimulator -allowProvisioningUpdates \ MARKETING_VERSION=${{ env.VERSION_STRING }} \ - CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} - # Adjust Framework Search Paths if your Xcode project doesn't automatically find it - # For example, if you need to point directly to the copied framework: - # FRAMEWORK_SEARCH_PATHS="$(SRCROOT)/Frameworks" + CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT } \ + -sdk iphoneos archive -archivePath ./IPA/BranchLinkSimulator.xcarchive + xcodebuild -exportArchive -archivePath ./IPA/BranchLinkSimulator.xcarchive -exportOptionsPlist IPA/Info.plist -exportPath IPA/ working-directory: ./ios-app-repo # Run xcodebuild from the App's checkout directory # --- Step 7: Echo the location of the generated .app bundle --- - name: Echo .app bundle location run: | - APP_PATH="./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app" - echo "Generated .app bundle location: $APP_PATH" - # You can also use 'find' to be more dynamic if the name might change - # find ./ios-app-repo/build -name "*.app" + APP_PATH="./ios-app-repo/IPA/BranchLinkSimulator.ipa" + echo "Generated IPA location: $APP_PATH" # --- Step 8: Upload Build Artifacts --- - name: Upload Build Artifacts uses: actions/upload-artifact@v4 with: name: BranchLinkSimulator-iOS-Debug-Build - path: ./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app + path: ./ios-app-repo/IPA/BranchLinkSimulator.ipa # --- Step 9: Upload and run tests on GPTDriver service. --- - name: Run GPTDriver tests From d51318353b17b3802ffdcd348b2c1720257ac112 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:37:06 -0700 Subject: [PATCH 22/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 4dfbaa378..173bca382 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -136,10 +136,16 @@ jobs: # --- Step 9: Upload and run tests on GPTDriver service. --- - name: Run GPTDriver tests run: | - # Ensure the script is executable - chmod +x ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh - # Execute the script, passing the .app path and platform - bash ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh ./ios-app-repo/build/Debug-iphonesimulator/BranchLinkSimulator.app ios + call=$(curl -i -X POST \ + -H "Content-Type: multipart/form-data" \ + -F "build=@./ios-app-repo/IPA/BranchLinkSimulator.ipa" \ + -F "organisation_key=${{ secrets.MOBILEBOOST_API_ORG_KEY }}" \ + -F "platform=ios" \ + -F "metadata={}" \ + https://api.mobileboost.io/uploadBuild/) + + mobileboost_url=$(echo "$call" | grep -o '"app_link":"[^"]*"' | cut -d '"' -f 4) + echo "${mobileboost_url}" >>$GITHUB_ENV env: API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design From cfbc43fd090c0c6a6a7fe720fa85aefbded7ecdf Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:38:50 -0700 Subject: [PATCH 23/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 173bca382..cf004daef 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -115,7 +115,7 @@ jobs: # We're passing MARKETING_VERSION (versionName) and CURRENT_PROJECT_VERSION (versionCode) xcodebuild -scheme BranchLinkSimulator -allowProvisioningUpdates \ MARKETING_VERSION=${{ env.VERSION_STRING }} \ - CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT } \ + CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} \ -sdk iphoneos archive -archivePath ./IPA/BranchLinkSimulator.xcarchive xcodebuild -exportArchive -archivePath ./IPA/BranchLinkSimulator.xcarchive -exportOptionsPlist IPA/Info.plist -exportPath IPA/ working-directory: ./ios-app-repo # Run xcodebuild from the App's checkout directory From 6e789bd2122d7b321c1fc32ab1123bca03b4c7d0 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 11:21:13 -0700 Subject: [PATCH 24/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index cf004daef..21956f074 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -76,8 +76,8 @@ jobs: working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE - name: Install the Apple certificate and provisioning profile env: - BUILD_CERTIFICATE_BASE64: ${{ secrets.BS_BUILD_CERTIFICATE }} - P12_PASSWORD: ${{ secrets.BS_P12_PASSWORD }} + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AA }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | @@ -91,8 +91,8 @@ jobs: # Create Provisioning Profiles echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AA }}" >> part_aa - echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AB }}" >> part_aa - echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AC }}" >> part_aa + #echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AB }}" >> part_aa + #echo "${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AC }}" >> part_aa base64 -D -i part_aa > $PP_PATH # create temporary keychain From 4214ca0ac15a36fbed7d9b04b69ec7102aad5318 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 11:43:37 -0700 Subject: [PATCH 25/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 21956f074..66b31385b 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -76,8 +76,8 @@ jobs: working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE - name: Install the Apple certificate and provisioning profile env: - BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + BUILD_CERTIFICATE_BASE64: ${{ secrets.BS_BUILD_CERTIFICATE }} + P12_PASSWORD: ${{ secrets.BS_P12_PASSWORD }} BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BS_BUILD_PROVISION_PROFILE_BASE64_PART_AA }} KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} run: | From a57d2edbad9c13537132a8738945da2b48abe797 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:16:00 -0700 Subject: [PATCH 26/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 66b31385b..8c7baa042 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -146,6 +146,12 @@ jobs: mobileboost_url=$(echo "$call" | grep -o '"app_link":"[^"]*"' | cut -d '"' -f 4) echo "${mobileboost_url}" >>$GITHUB_ENV + curl -X POST https://api.mobileboost.io/tests/execute \ + -H "Content-Type: application/json" \ + -d '{ + "organisationId": "$API_ORG_KEY", + "platform": "ios" + }' env: API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design From 7bab60f76f0bc9ec694fd8bb0ae22b2ca56578ff Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:25:42 -0700 Subject: [PATCH 27/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 8c7baa042..56ea7c0a8 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -149,7 +149,7 @@ jobs: curl -X POST https://api.mobileboost.io/tests/execute \ -H "Content-Type: application/json" \ -d '{ - "organisationId": "$API_ORG_KEY", + "organisationId": ${{ secrets.MOBILEBOOST_API_ORG_KEY }}", "platform": "ios" }' env: From b97e8a28afa810c67bf00266865c3f9b4b3ee9d5 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:39:55 -0700 Subject: [PATCH 28/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 56ea7c0a8..20eef2c98 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -145,11 +145,11 @@ jobs: https://api.mobileboost.io/uploadBuild/) mobileboost_url=$(echo "$call" | grep -o '"app_link":"[^"]*"' | cut -d '"' -f 4) - echo "${mobileboost_url}" >>$GITHUB_ENV + echo "MOBILEBOOST_URL=${mobileboost_url}" >> $GITHUB_ENV curl -X POST https://api.mobileboost.io/tests/execute \ -H "Content-Type: application/json" \ -d '{ - "organisationId": ${{ secrets.MOBILEBOOST_API_ORG_KEY }}", + "organisationId": \"${{ secrets.MOBILEBOOST_API_ORG_KEY }}\", "platform": "ios" }' env: From ac468935c908056a4c36ebec0f8b3e3e0dbad9ff Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:48:55 -0700 Subject: [PATCH 29/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 20eef2c98..81785963c 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -148,10 +148,10 @@ jobs: echo "MOBILEBOOST_URL=${mobileboost_url}" >> $GITHUB_ENV curl -X POST https://api.mobileboost.io/tests/execute \ -H "Content-Type: application/json" \ - -d '{ - "organisationId": \"${{ secrets.MOBILEBOOST_API_ORG_KEY }}\", - "platform": "ios" - }' + -d "{ + \"organisationId\": \"${{ secrets.MOBILEBOOST_API_ORG_KEY }}\", + \"platform\": \"ios\" + }" env: API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design From 2eabc5975711de9bce3fd7a5452f39d3d6d5450b Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:27:33 -0700 Subject: [PATCH 30/35] Added GPT Driver TestRun shell script --- .github/gptdriverrunscript.sh | 124 +++++++++++++++++++++++++ .github/workflows/gpt-driver-tests.yml | 18 +--- 2 files changed, 126 insertions(+), 16 deletions(-) create mode 100644 .github/gptdriverrunscript.sh diff --git a/.github/gptdriverrunscript.sh b/.github/gptdriverrunscript.sh new file mode 100644 index 000000000..2bb42b1bc --- /dev/null +++ b/.github/gptdriverrunscript.sh @@ -0,0 +1,124 @@ +#!/usr/bin/env bash + +set -eo pipefail + +# Constants should ideally be set as environment variables for security +readonly API_URL="https://api.mobileboost.io" +readonly API_ORG_KEY="${API_ORG_KEY}" +readonly API_TOKEN="${API_TOKEN:-null}" +readonly TEST_TIMEOUT="${TEST_TIMEOUT:-7200}" +readonly TEST_TAGS="${TEST_TAGS:-}" + +# Function to post data using curl and handle errors +post_data() { + local url=$1 + local body=$2 + if ! response=$(curl -s -f -X POST -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -d "$body" "$url"); then + echo "Error: Network request failed with error $response" >&2 + exit 1 + fi + echo "$response" +} + +# Validate inputs +if [[ -z "$1" || -z "$2" ]]; then + echo "Usage: $0 " + exit 1 +fi + +# Validate environment variables +if [[ -z "$API_ORG_KEY" ]]; then + echo "Please set API_ORG_KEY to your organization key" + exit 1 +fi + +buildFilename="$1" +buildPlatform="$2" +tags=() + +# Check if TEST_TAGS is provided and split into an array +if [[ -n "$TEST_TAGS" ]]; then + IFS=',' read -ra tags <<< "$TEST_TAGS" +fi + +# Upload build file +echo -n "Uploading build from $buildFilename for $buildPlatform: " +if ! uploadedBuildResponse=$(curl -s -f -X POST \ + -H "Authorization: Bearer $API_TOKEN" \ + -H "Content-Type: multipart/form-data" \ + -F "build=@$buildFilename" \ + -F "organisation_key=$API_ORG_KEY" \ + -F "platform=$buildPlatform" \ + -F "metadata={}" \ + "$API_URL/uploadBuild/"); then + echo "Error: Failed to upload build" >&2 + exit 1 +fi + +# Extract the buildId +if ! buildId=$(jq -r '.buildId' <<< "$uploadedBuildResponse") || [ -z "$buildId" ]; then + echo "Error: Failed to extract build ID from the response" >&2 + exit 1 +fi +echo "uploaded (ID: $buildId), app link: $(jq -r '.app_link' <<< "$uploadedBuildResponse")" + +# Execute test suite +echo "Executing test suite..." +jsonPayload="{\"organisationId\": \"$API_ORG_KEY\", \"uploadId\": \"$buildId\"" +if [ ${#tags[@]} -gt 0 ]; then + jsonTags=$(printf ',\"%s\"' "${tags[@]}") + jsonTags="[${jsonTags:1}]" + jsonPayload+=", \"tags\": $jsonTags" +fi +jsonPayload+="}" +if ! testSuiteRunId=$(post_data "$API_URL/tests/execute" "$jsonPayload" | jq -r '.test_suite_ids[0]') || [ -z "$testSuiteRunId" ]; then + echo "Error: Test suite execution failed" >&2 + exit 1 +fi + +# Wait for test suite to finish +echo -n "Waiting for test suite to finish..." +startTime=$(date +%s) +while true; do + if ! testSuiteData=$(curl -s -f "$API_URL/testSuiteRuns/$testSuiteRunId/gh"); then + echo "Error: Failed to retrieve test suite data" >&2 + exit 1 + fi + testSuiteStatus=$(jq -r '.status' <<< "$testSuiteData") + + if [[ + "$testSuiteStatus" == "completed" + ]]; then + echo "Status is $testSuiteStatus!" >&2 + break + fi + + if (( $(date +%s) - startTime >= TEST_TIMEOUT )); then + echo "Timeout exceeded while waiting for test suite to finish." >&2 + exit 1 + fi + + echo -n "." + sleep 1 +done +echo " done!" + +# Write test suite summary to file if available +if [[ -n "$GITHUB_STEP_SUMMARY" && -w "$GITHUB_STEP_SUMMARY" ]]; then + jq -r '.markdown' <<< "$testSuiteData" >> "$GITHUB_STEP_SUMMARY" + echo "Step summary written to $GITHUB_STEP_SUMMARY" +fi + +# Check test suite result +if ! testSuiteResult=$(jq -r '.result' <<< "$testSuiteData"); then + echo "Test suite did not pass, result: $testSuiteResult" >&2 + exit 1 +fi + +if [[ "$testSuiteResult" == "succeeded" ]]; then + echo "Test passed successfully" + exit 0 +else + echo "Test suite did not pass, result: $testSuiteResult" >&2 + exit 1 +fi diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 81785963c..21a5c32d9 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -136,22 +136,8 @@ jobs: # --- Step 9: Upload and run tests on GPTDriver service. --- - name: Run GPTDriver tests run: | - call=$(curl -i -X POST \ - -H "Content-Type: multipart/form-data" \ - -F "build=@./ios-app-repo/IPA/BranchLinkSimulator.ipa" \ - -F "organisation_key=${{ secrets.MOBILEBOOST_API_ORG_KEY }}" \ - -F "platform=ios" \ - -F "metadata={}" \ - https://api.mobileboost.io/uploadBuild/) - - mobileboost_url=$(echo "$call" | grep -o '"app_link":"[^"]*"' | cut -d '"' -f 4) - echo "MOBILEBOOST_URL=${mobileboost_url}" >> $GITHUB_ENV - curl -X POST https://api.mobileboost.io/tests/execute \ - -H "Content-Type: application/json" \ - -d "{ - \"organisationId\": \"${{ secrets.MOBILEBOOST_API_ORG_KEY }}\", - \"platform\": \"ios\" - }" + chmod +x ./branch-sdk-repo/.github/gptdriverrunscript.sh + bash ./branch-sdk-repo/.github/gptdriverrunscript.sh /ios-app-repo/IPA/BranchLinkSimulator.ipa ios env: API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design From 2beed6a88489fa6b4f39469a6b1c18da583b5bd8 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:33:55 -0700 Subject: [PATCH 31/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 21a5c32d9..113d00791 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -136,8 +136,10 @@ jobs: # --- Step 9: Upload and run tests on GPTDriver service. --- - name: Run GPTDriver tests run: | + ls -la + pwd chmod +x ./branch-sdk-repo/.github/gptdriverrunscript.sh - bash ./branch-sdk-repo/.github/gptdriverrunscript.sh /ios-app-repo/IPA/BranchLinkSimulator.ipa ios + ./branch-sdk-repo/.github/gptdriverrunscript.sh /ios-app-repo/IPA/BranchLinkSimulator.ipa ios env: API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design From 411b06340bb8cec5a4df59778030192f34793dad Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:47:14 -0700 Subject: [PATCH 32/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 113d00791..fcbad738b 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -136,10 +136,8 @@ jobs: # --- Step 9: Upload and run tests on GPTDriver service. --- - name: Run GPTDriver tests run: | - ls -la - pwd - chmod +x ./branch-sdk-repo/.github/gptdriverrunscript.sh - ./branch-sdk-repo/.github/gptdriverrunscript.sh /ios-app-repo/IPA/BranchLinkSimulator.ipa ios + chmod +x ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh + ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh /ios-app-repo/IPA/BranchLinkSimulator.ipa ios env: API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design From 6f0aa17c6275ae9643f3f6cf1ba7f88cb595a726 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:52:03 -0700 Subject: [PATCH 33/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index fcbad738b..12f311fbc 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -137,7 +137,7 @@ jobs: - name: Run GPTDriver tests run: | chmod +x ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh - ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh /ios-app-repo/IPA/BranchLinkSimulator.ipa ios + ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh ./ios-app-repo/IPA/BranchLinkSimulator.ipa ios env: API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design From afed731a3a083dd5496aa0efc47ca38d44985622 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Tue, 14 Oct 2025 08:31:06 -0700 Subject: [PATCH 34/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index 12f311fbc..e50c6cdd9 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -1,12 +1,15 @@ -name: iOS Release Build and GPTDriver Tests +name: GPTDriver Test Suite Automation on: workflow_dispatch: inputs: + push: + branches: + - 'Release-*' # Trigger for branches starting with "Release-" jobs: - BuildAndTestAppOnGPTDriver: # Job name, as chosen - runs-on: macos-latest # macOS runner is required for iOS builds + BuildAndTestAppOnGPTDriver: + runs-on: macos-latest steps: # --- Step 1: Extract version from branch name --- - name: Extract version from branch name @@ -56,9 +59,9 @@ jobs: # The output framework will be in build/Debug-iphonesimulator/BranchSDK.framework xcodebuild -scheme xcframework \ BUILD_DIR="${{ github.workspace }}/branch-ios-sdk-repo/build" - working-directory: ./branch-ios-sdk-repo # Run xcodebuild from the SDK's checkout directory + working-directory: ./branch-ios-sdk-repo - # --- Step 4: Checkout the iOS Branch Link Simulator App repository --- + # --- Step 4: Checkout the iOS Branch Link Simulator App repository --- - name: Checkout BranchMetrics/BranchLinkSimulator (App) uses: actions/checkout@v4 with: @@ -74,6 +77,8 @@ jobs: # Copy the built framework cp -R ./branch-ios-sdk-repo/build/BranchSDK.xcframework ./ios-app-repo/Frameworks/ working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE + + # --- Step 6: Install Code Sign Certificate and Provisioning profile - name: Install the Apple certificate and provisioning profile env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BS_BUILD_CERTIFICATE }} @@ -118,7 +123,7 @@ jobs: CURRENT_PROJECT_VERSION=${{ env.VERSION_CODE_INT }} \ -sdk iphoneos archive -archivePath ./IPA/BranchLinkSimulator.xcarchive xcodebuild -exportArchive -archivePath ./IPA/BranchLinkSimulator.xcarchive -exportOptionsPlist IPA/Info.plist -exportPath IPA/ - working-directory: ./ios-app-repo # Run xcodebuild from the App's checkout directory + working-directory: ./ios-app-repo # --- Step 7: Echo the location of the generated .app bundle --- - name: Echo .app bundle location @@ -133,12 +138,12 @@ jobs: name: BranchLinkSimulator-iOS-Debug-Build path: ./ios-app-repo/IPA/BranchLinkSimulator.ipa - # --- Step 9: Upload and run tests on GPTDriver service. --- + # --- Step 9: Run tests on GPTDriver service. --- - name: Run GPTDriver tests run: | chmod +x ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh ./branch-ios-sdk-repo/.github/gptdriverrunscript.sh ./ios-app-repo/IPA/BranchLinkSimulator.ipa ios env: API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} - API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} # As per vendor design - TEST_TAGS: Release + API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }} + TEST_TAGS: ios From 9544002fcdd0b919fddb02f2bf5a2198683dd348 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Tue, 14 Oct 2025 08:32:33 -0700 Subject: [PATCH 35/35] Update gpt-driver-tests.yml --- .github/workflows/gpt-driver-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gpt-driver-tests.yml b/.github/workflows/gpt-driver-tests.yml index e50c6cdd9..99ece3fb7 100644 --- a/.github/workflows/gpt-driver-tests.yml +++ b/.github/workflows/gpt-driver-tests.yml @@ -3,7 +3,7 @@ name: GPTDriver Test Suite Automation on: workflow_dispatch: inputs: - push: + push: branches: - 'Release-*' # Trigger for branches starting with "Release-"