-
Notifications
You must be signed in to change notification settings - Fork 296
58 lines (49 loc) · 1.5 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
name: CI
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: macOS-latest
env:
SCHEME: URLNavigator-Package
CODECOV_PACKAGE_NAME: URLNavigator
strategy:
matrix:
env:
- sdk: iphonesimulator
destination: platform=iOS Simulator,name=iPhone 13 Pro,OS=latest
- sdk: appletvsimulator
destination: platform=tvOS Simulator,name=Apple TV,OS=latest
steps:
- uses: actions/checkout@v3
- name: List SDKs and Devices
run: xcodebuild -showsdks; xcrun xctrace list devices
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Build and Test
run: |
set -o pipefail
xcodebuild -resolvePackageDependencies
xcodebuild clean build test \
-scheme "$SCHEME" \
-sdk "$SDK" \
-destination "$DESTINATION" \
-configuration Debug \
-enableCodeCoverage YES \
-resultBundlePath "./${{ matrix.env.sdk }}.xcresult" \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
env:
SDK: ${{ matrix.env.sdk }}
DESTINATION: ${{ matrix.env.destination }}
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
xcode: true
xcode_archive_path: "./${{ matrix.env.sdk }}.xcresult"