Skip to content

actions: Add xcresulttool report #24

actions: Add xcresulttool report

actions: Add xcresulttool report #24

Workflow file for this run

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 }}