chore
New analytics initial call
#5133
Workflow file for this run
This file contains 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 | |
jobs: | |
build: | |
env: | |
sonarToken: ${{ secrets.SONAR_TOKEN }} | |
runs-on: macos-13-xlarge # Apple Silicon Runner | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: n1hility/cancel-previous-runs@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Select latest Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.1' | |
- name: Install Tools | |
run: | | |
brew install sonar-scanner | |
gem install slather | |
- name: Validate 3DS2 SDK version | |
run: | | |
Scripts/validate-3ds2-SDK-version.sh | |
- name: Validate Adyen SDK version | |
run: | | |
Scripts/validate-Adyen-SDK-version.sh | |
- name: Clean Build and Test | |
run: | | |
xcodebuild -version | |
xcodebuild clean build test -project "${project}" -scheme "${scheme}" ${params} -destination "${destination}" | xcpretty --utf --color && exit ${PIPESTATUS[0]} | |
env: | |
project: 'Adyen.xcodeproj' | |
params: '-derivedDataPath ./DerivedData -enableCodeCoverage YES -skipPackagePluginValidation' | |
scheme: 'AdyenUIHost' | |
destination: 'name=iPhone 14,OS=17.2' | |
- name: Code Coverage | |
run: | | |
slather coverage --sonarqube-xml ${params} ${project} | |
env: | |
project: 'Adyen.xcodeproj' | |
params: ' | |
--build-directory ./DerivedData | |
--output-directory ./reports | |
--scheme AdyenUIHost | |
--binary-basename Adyen | |
--binary-basename AdyenCard | |
--binary-basename AdyenDropIn | |
--binary-basename AdyenWeChatPay | |
--binary-basename AdyenComponents | |
--binary-basename AdyenSession | |
--binary-basename AdyenEncryption | |
--binary-basename AdyenActions | |
--binary-basename AdyenCashAppPay | |
--binary-basename AdyenSwiftUI' | |
- 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 }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |