PRISM-10047 - Add cocoapods support #76
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: Verify PR | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- "main" | |
- "develop" | |
- "release/*" | |
env: | |
destination: "platform=iOS Simulator,name=iPhone 15 Pro,OS=latest" | |
configuration: "Debug" | |
noIndex: "COMPILER_INDEX_STORE_ENABLE=NO" | |
noSigning: "CODE_SIGNING_ALLOWED=NO" | |
versionXcode: "15.0.1" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Swift Lint | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Lint Swift Files | |
run: bash .github/scripts/lintSwiftFiles.sh | |
risk-sdk: | |
name: Risk SDK Verification | |
runs-on: macos-13-xl | |
needs: lint | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Select Xcode | |
run: | | |
sudo xcode-select -switch /Applications/Xcode_${versionXcode}.app | |
- name: Log xcodebuild Version | |
run: | | |
xcodebuild -version | |
- name: Set git user details | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config --global credential.helper 'cache --timeout=3600' | |
git config --global user.email "[email protected]" | |
git remote set-url origin "https://${GITHUB_ACTOR}:${{ secrets.ACCESS_TOKEN }}@github.com/${{ github.repository }}.git" | |
- name: Run Risk SDK Tests | |
run: | | |
set -o pipefail && xcodebuild -scheme "${scheme}" test -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty | |
env: | |
scheme: Risk | |
- name: Build Risk SDK SPM iOS Example | |
run: | | |
set -o pipefail && xcodebuild "build" "-project" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty | |
env: | |
path: "iOSExampleRiskSPM/RiskExample.xcodeproj" | |
scheme: Risk | |
# TODO: Uncomment when Risk SDK CocoaPods iOS Example is ready | |
# - name: Risk Pod Update | |
# run: | | |
# cd iOS\ Example\ Frame | |
# pod update | |
# - name: Build Risk SDK CocoaPods iOS Example | |
# run: | | |
# set -o pipefail && xcodebuild "build" "-workspace" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty | |
# env: | |
# path: "iOSExampleRiskCocoapods/iOSExampleRiskCocoapods.xcworkspace" | |
# scheme: "iOSExampleRiskCocoapods" |