feat(Cripto List): Tracking favorites cryptos (#8) #30
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/[email protected] | |
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/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |