diff --git a/.github/workflows/base_ut.yaml b/.github/workflows/base_ut.yaml new file mode 100644 index 00000000..4a9258db --- /dev/null +++ b/.github/workflows/base_ut.yaml @@ -0,0 +1,63 @@ +name: Build and Test iOS UT + +on: + workflow_call: + inputs: + test-plan: + description: The test plan to run + required: true + type: string +jobs: + build: + runs-on: [macos-14] + + steps: + - name: Select Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: 15.2 + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Build iOS and Test + uses: sersoft-gmbh/xcodebuild-action@v1 + with: + action: build test + build-settings: ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=YES + configuration: Debug + derived-data-path: "${{github.workspace}}/SplitApp" + destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15' + project: Split.xcodeproj + scheme: Split + sdk: 'iphonesimulator' + test-plan: $ {{ inputs.test-plan }} + use-xcpretty: true + + # - name: Install java 11 + # uses: actions/setup-java@v3 + # with: + # distribution: 'oracle' + # java-version: '17' + + # - name: SonarQube Install + # uses: mathrix-education/sonar-scanner@master + # env: + # ACTIONS_ALLOW_UNSECURE_COMMANDS: true + # with: + # version: 4.8.0.2856 + # scan: false + + # - name: SonarQube Scan + # run: > + # sonar-scanner --debug + # -Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} + # -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} + # -Dsonar.projectName=${{ github.event.repository.name }} + # -Dsonar.projectKey=splitio_ios-client + # -Dsonar.github.token=${{ secrets.GITHUB_TOKEN }} + # -Dsonar.c.file.suffixes=- + # -Dsonar.cpp.file.suffixes=- + # -Dsonar.objc.file.suffixes=- diff --git a/.github/workflows/test_ios_ut_4.yaml b/.github/workflows/test_ios_ut_4.yaml index dc323306..f8c946e7 100644 --- a/.github/workflows/test_ios_ut_4.yaml +++ b/.github/workflows/test_ios_ut_4.yaml @@ -1,4 +1,4 @@ -name: Build and Test iOS UT (1) +name: Build and Test iOS UT (4) on: push: @@ -12,55 +12,6 @@ on: jobs: build: - runs-on: [macos-14] - - steps: - - name: Select Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: 15.2 - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Build iOS and Test 4 - uses: sersoft-gmbh/xcodebuild-action@v3 - with: - action: build test - build-settings: ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=YES - configuration: Debug - derived-data-path: "${{github.workspace}}/SplitApp" - destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15' - project: Split.xcodeproj - scheme: Split - sdk: 'iphonesimulator' - test-plan: 'SplitiOSUnit_4' - use-xcpretty: true - - # - name: Install java 11 - # uses: actions/setup-java@v3 - # with: - # distribution: 'oracle' - # java-version: '17' - - # - name: SonarQube Install - # uses: mathrix-education/sonar-scanner@master - # env: - # ACTIONS_ALLOW_UNSECURE_COMMANDS: true - # with: - # version: 4.8.0.2856 - # scan: false - - # - name: SonarQube Scan - # run: > - # sonar-scanner --debug - # -Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} - # -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} - # -Dsonar.projectName=${{ github.event.repository.name }} - # -Dsonar.projectKey=splitio_ios-client - # -Dsonar.github.token=${{ secrets.GITHUB_TOKEN }} - # -Dsonar.c.file.suffixes=- - # -Dsonar.cpp.file.suffixes=- - # -Dsonar.objc.file.suffixes=- + uses: ./.github/workflows/base_ut.yaml + with: + test-plan: 'SplitiOSUnit_4'