[MOB-10402] Add test reports #1498
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: pull_request | |
jobs: | |
run-tests-job: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Setup Ruby and xcpretty | |
run: | | |
gem install erb | |
gem install xcpretty | |
- name: Build and test | |
run: | | |
xcodebuild test \ | |
-project swift-sdk.xcodeproj \ | |
-scheme swift-sdk \ | |
-sdk iphonesimulator \ | |
-destination 'platform=iOS Simulator,name=iPhone 16 Pro' \ | |
-enableCodeCoverage YES \ | |
-resultBundlePath TestResults.xcresult \ | |
CODE_SIGNING_REQUIRED=NO | xcpretty && exit ${PIPESTATUS[0]} | |
- name: CocoaPods lint | |
run: pod lib lint --allow-warnings | |
- name: Upload coverage report to codecov.io | |
run: bash <(curl -s https://codecov.io/bash) -X gcov -J 'IterableSDK' -J 'IterableAppExtensions' | |
- name: Create Test Report | |
uses: kishikawakatsumi/xcresulttool@v1 | |
with: | |
path: TestResults.xcresult | |
if: success() || failure() |