Skip to content

[DEV-12345] DO NOT MERGE - TESTING #11

[DEV-12345] DO NOT MERGE - TESTING

[DEV-12345] DO NOT MERGE - TESTING #11

name: CI
on:
pull_request:
types: [opened, edited, reopened, synchronize]
workflow_dispatch:
env:
GH_TOKEN: ${{ secrets.GIT_TOKEN_SECRET }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
PR_NUMBER: ${{ github.event.number }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_SECRET }}
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Install CocoaPods
run: |
gem install cocoapods
pod install --project-directory=Example
- name: List files
run: ls -la Example
- name: Test
run: |
xcodebuild -workspace Example/TrustlySDK.xcworkspace \
-scheme TrustlySDK-Example \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' \
test
- name: Install Sonar Scanner
run: |
brew update
brew install sonar-scanner
- name: SonarQube Analysis
run: |
sonar-scanner \
-Dsonar.host.url=https://sonarqube.trustly.one \
-Dsonar.login="${SONAR_TOKEN}" \
-Dsonar.projectKey="trustly-ios" \
-Dsonar.projectName="trustly-ios" \
-Dsonar.branch.name="${{ github.head_ref }}" \
-Dsonar.sources="." \
-Dsonar.exclusions="**/Pods/**,**/Tests/**" \
-Dsonar.verbose=true