forked from Jeroenbb94/FlickrFinder
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.46 KB
/
main.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
name: Sonar
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.0.app/Contents/Developer
'on':
pull_request_target:
branches:
- "**"
types: [opened, synchronize, reopened, labeled]
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.2.0'
- name: Install Dependencies
run: >
wget
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-macosx.zip
&& unzip sonar-scanner-cli-5.0.1.3006-macosx.zip && wget
https://sonarcloud.io/static/cpp/build-wrapper-macosx-x86.zip && unzip
build-wrapper-macosx-x86.zip
- name: Run tests
run: >
set -o pipefail && xcodebuild -project
FlickrFinder.xcodeproj -scheme FlickrFinder
-sdk 'iphonesimulator16.2'
-destination 'platform=iOS Simulator,name=iPhone 14,OS=16.2'
-derivedDataPath Build/ -enableCodeCoverage YES clean build test
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" ONLY_ACTIVE_ARCH=NO |
xcpretty
bash xccov-to-sonarqube-generic.sh Build/Logs/Test/*.xcresult/ >
coverage.xml
- name: Sonar
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
SONAR_TOKEN: '${{ secrets.SONAR_TOKEN }}'
run: >
sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner