Skip to content

feat: change the existing constant url to receiving url from sdk initialization #139

feat: change the existing constant url to receiving url from sdk initialization

feat: change the existing constant url to receiving url from sdk initialization #139

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-large
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: Set up Ruby environment
run: |
gem install bundler
- name: Install Cocoapods
run: gem install cocoapods
- name: Pod install
run: pod install --repo-update
- name: Run tests(iOS)
run: |
xcodebuild -workspace MetricsReporter.xcworkspace -scheme MetricsReporterTests-iOS test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -enableCodeCoverage YES -derivedDataPath build | xcpretty
- name: Run tests(tvOS)
run: |
xcodebuild -workspace MetricsReporter.xcworkspace -scheme MetricsReporterTests-tvOS test -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' -enableCodeCoverage YES -derivedDataPath build | xcpretty
- name: Run tests(watchOS)
run: |
xcodebuild -workspace MetricsReporter.xcworkspace -scheme MetricsReporterTests-watchOS test -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 7 (45mm)' -enableCodeCoverage YES -derivedDataPath build | xcpretty
# - name: Run tests(macOS)
# run: |
# xcodebuild -workspace MetricsReporter.xcworkspace -scheme MetricsReporterTests-macOS test -destination 'platform=macOS,arch=x86_64' -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
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}