[v5] Add new SDK data fields #9165
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Scan PR | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - develop | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: write # sonar | |
| jobs: | |
| build: | |
| env: | |
| sonarToken: ${{ secrets.SONAR_TOKEN }} | |
| destination: "name=iPhone 16,OS=18.6" | |
| destination_iPad: "name=iPad (10th generation),OS=18.6" | |
| project: "Adyen.xcodeproj" | |
| params: "-derivedDataPath ./DerivedData -skipPackagePluginValidation" | |
| runs-on: macos-15-xlarge | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Validate Versions | |
| run: | | |
| Scripts/validate-3ds2-SDK-version.sh | |
| Scripts/validate-Adyen-SDK-version.sh | |
| - name: Select latest Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.4' | |
| - name: 🛠️ Install Tools | |
| run: | | |
| brew update | |
| brew install sonar-scanner | |
| - name: 👷 Clean Build | |
| run: | | |
| xcodebuild -version | |
| xcodebuild clean build -project "${{env.project}}" -scheme "${scheme}" ${params} -destination "${{env.destination}}" | xcpretty --utf --color && exit ${PIPESTATUS[0]} | |
| env: | |
| params: '${{env.params}}' | |
| scheme: 'AdyenUIHost' | |
| - name: 🧪 Unit + Integration Tests | |
| run: | | |
| xcodebuild test \ | |
| -project "${{env.project}}" \ | |
| -scheme "${scheme}" \ | |
| -testPlan "${testPlan}" \ | |
| -enableCodeCoverage YES \ | |
| -resultBundlePath "${resultPath}" \ | |
| ${params} \ | |
| -destination "${{env.destination}}" | xcpretty --utf --color && exit ${PIPESTATUS[0]} | |
| env: | |
| params: '${{env.params}}' | |
| scheme: 'AdyenUIHost' | |
| testPlan: 'CI' | |
| resultPath: 'Test-CI-Result.xcresult' | |
| - name: 🌇 Snapshot Tests iPhone | |
| run: | | |
| xcodebuild test \ | |
| -project "${{env.project}}" \ | |
| -scheme "${scheme}" \ | |
| -testPlan "${testPlan}" \ | |
| -enableCodeCoverage YES \ | |
| -resultBundlePath "${resultPath}" \ | |
| ${params} \ | |
| -destination "${{env.destination}}" | xcpretty --utf --color && exit ${PIPESTATUS[0]} | |
| env: | |
| params: '${{env.params}}' | |
| scheme: 'SnapshotTests' | |
| testPlan: 'SnapshotTests' | |
| resultPath: 'Test-Snapshots-Result.xcresult' | |
| - name: 🌇 Snapshot Tests iPad | |
| run: | | |
| xcodebuild test \ | |
| -project "${{env.project}}" \ | |
| -scheme "${scheme}" \ | |
| -testPlan "${testPlan}" \ | |
| -enableCodeCoverage YES \ | |
| -resultBundlePath "${resultPath}" \ | |
| ${params} \ | |
| -destination "${{env.destination_iPad}}" | xcpretty --utf --color && exit ${PIPESTATUS[0]} | |
| env: | |
| params: '${{env.params}}' | |
| scheme: 'SnapshotTests' | |
| testPlan: 'SnapshotTests' | |
| resultPath: 'Test-Snapshots-Result-iPad.xcresult' | |
| - name: 🍛 Prepare coverage reports | |
| run: | | |
| bash Scripts/xccov-to-sonarqube-generic.sh Test-Snapshots-Result.xcresult/ > sonarqube-coverage-snapshots.xml | |
| sed "s#$PWD/##g" sonarqube-coverage-snapshots.xml > sonarqube_updated_snapshots.xml | |
| bash Scripts/xccov-to-sonarqube-generic.sh Test-CI-Result.xcresult/ > sonarqube-coverage-ci.xml | |
| sed "s#$PWD/##g" sonarqube-coverage-ci.xml > sonarqube_updated_ci.xml | |
| - name: 🧼 SwiftLint | |
| run: | | |
| brew install swiftlint | |
| fastlane run swiftlint output_file:"reports/swiftlint.json" reporter:"json" ignore_exit_status:"true" | |
| - name: 📡 Run Sonar | |
| if: ${{ env.sonarToken != 0 }} | |
| run: | | |
| git fetch --unshallow --no-tags | |
| sonar-scanner -Dsonar.token=${{ secrets.SONAR_TOKEN }} -Dsonar.coverageReportPaths=sonarqube_updated_CI.xml,sonarqube_updated_snapshots.xml | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |