-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (48 loc) · 1.54 KB
/
sonar_analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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 }}
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