Skip to content

Correcting type value for mealVoucher_FR (#1904) #6709

Correcting type value for mealVoucher_FR (#1904)

Correcting type value for mealVoucher_FR (#1904) #6709

Workflow file for this run

name: Scan PR
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- develop
jobs:
build:
env:
sonarToken: ${{ secrets.SONAR_TOKEN }}
destination: "name=iPhone 15 Pro,OS=17.2"
project: "Adyen.xcodeproj"
params: "-derivedDataPath ./DerivedData -skipPackagePluginValidation"
runs-on: macos-14-xlarge # Apple Silicon Runner
steps:
- uses: actions/checkout@v4
- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- 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: '15.1'
- name: 🛠️ Install Tools
run: |
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
run: |
xcodebuild test \
-project "${{env.project}}" \
-scheme "${scheme}" \
-testPlan "${testPlan}" \
-enableCodeCoverage YES \
-resultBundlePath "${resultPath}" \
${params} \
-destination "name=iPhone 15 Pro,OS=17.2" -destination "name=iPad (10th generation),OS=17.2" | xcpretty --utf --color && exit ${PIPESTATUS[0]}
env:
params: '${{env.params}}'
scheme: 'SnapshotTests'
testPlan: 'SnapshotTests'
resultPath: 'Test-Snapshots-Result.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 }}