-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.41 KB
/
ios.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 }}" \
clean build
- name: Test
run: |
xcodebuild \
-scheme "$SCHEME" \
-destination "platform=iOS Simulator,name=${SIMULATOR},OS=${{ matrix.os_version }}" \
-enableCodeCoverage YES \
test
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}