actions: Add xcresulttool report #24
Workflow file for this run
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: iOS build and test workflow | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
SCHEME: CryptoWidgetKitApp | |
SIMULATOR: "iPhone 15" | |
jobs: | |
build: | |
name: Build and test using Xcode ${{ matrix.xcode_version }} iOS ${{ matrix.os_version }} | |
runs-on: macos-14 | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: true | |
matrix: | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators | |
xcode_version: [ "15.4" ] | |
os_version: [ "17.0.1"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Xcode | |
uses: maxim-lobanov/setup-xcode@v1.6.0 | |
with: | |
xcode-version: ${{ matrix.xcode_version }} | |
- name: Build | |
run: | | |
# https://mokacoding.com/blog/xcodebuild-destination-options/ | |
xcodebuild \ | |
-scheme "$SCHEME" \ | |
-destination "platform=iOS Simulator,name=${SIMULATOR},OS=${{ matrix.os_version }}" \ | |
build-for-testing | xcpretty --color --simple | |
- name: Test | |
run: | | |
xcodebuild \ | |
-scheme "$SCHEME" \ | |
-destination "platform=iOS Simulator,name=${SIMULATOR},OS=${{ matrix.os_version }}" \ | |
-enableCodeCoverage YES \ | |
-resultBundlePath TestResults \ | |
test-without-building | xcpretty --color --simple | |
- name: Xcresulttool | |
uses: kishikawakatsumi/xcresulttool@v1 | |
with: | |
path: TestResults.xcresult | |
if: success() || failure() | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |