Skip to content

chore: fix build warnings #445

chore: fix build warnings

chore: fix build warnings #445

Workflow file for this run

name: 'Tests & Coverage'
on:
workflow_dispatch:
push:
branches: ['master', 'develop']
pull_request:
branches: ['master', 'develop']
types: ['opened', 'reopened', 'synchronize']
jobs:
build:
name: 'Tests & Coverage'
runs-on: macOS-latest
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Install xcpretty
run: gem install xcpretty
- name: Install Cocoapods
run: gem install cocoapods
- name: Pod install
run: pod install --repo-update
- name: Run build-wrapper
run: |
build-wrapper-macosx-x86 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} xcodebuild -workspace Rudder.xcworkspace -scheme Rudder_iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' | xcpretty
- name: Run tests(iOS)
run: |
xcodebuild -workspace Rudder.xcworkspace -scheme RudderTests-iOS test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -enableCodeCoverage YES -derivedDataPath build | xcpretty
- name: Run tests(tvOS)
run: |
xcodebuild -workspace Rudder.xcworkspace -scheme RudderTests-tvOS test -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' -enableCodeCoverage YES -derivedDataPath build | xcpretty
- name: Run tests(watchOS)
run: |
xcodebuild -workspace Rudder.xcworkspace -scheme RudderTests-watchOS test -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 7 (45mm)' -enableCodeCoverage YES -derivedDataPath build | xcpretty
- name: Collect coverage into one XML report
run: |
bash xccov-to-generic.sh build/Logs/Test/*.xcresult/ > generic-coverage.xml
- name: SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner -Dsonar.host.url=https://sonarcloud.io