Fix broken CI workflows (v4) #6960
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: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
env: | |
sonarToken: ${{ secrets.SONAR_TOKEN }} | |
destination: "name=iPhone 16 Pro,OS=18.1" | |
project: "Adyen.xcodeproj" | |
params: "-derivedDataPath ./DerivedData -skipPackagePluginValidation" | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: n1hility/cancel-previous-runs@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '17' | |
- name: Select latest Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '16.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: Build and test | |
run: | | |
xcodebuild -version | |
xcodebuild clean build test -project "${project}" -scheme "${scheme}" ${params} -destination "${destination}" | xcpretty && exit ${PIPESTATUS[0]} | |
env: | |
params: '${{env.params}}' | |
scheme: 'AdyenUIHost' | |
- name: Slather | |
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 AdyenEncryption | |
--binary-basename AdyenActions | |
--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.login=${{ secrets.SONAR_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |