-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
97 lines (91 loc) · 2.9 KB
/
test.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Unit Test
on:
pull_request:
paths:
- "**.swift"
- "**.xcodeproj"
- "**.m"
- "**.h"
- "**.podspec"
- "Podfile"
- "Podfile.lock"
- "**/test.yml"
jobs:
swiftpm:
name: Test iOS (swiftpm)
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@master
- name: iOS - Swift PM
run: |
pod install
set -o pipefail && swift test --parallel
iOS:
name: Test iOS
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
strategy:
matrix:
run-config:
- { scheme: 'Hero', destination: 'platform=iOS Simulator,name=iPhone 14 Pro Max' }
- { scheme: 'Hero (tvOS)', destination: 'platform=tvOS Simulator,name=Apple TV 4K' }
steps:
- name: Checkout
uses: actions/checkout@master
- name: iOS - ${{ matrix.run-config.destination }}
run: |
pod install
set -o pipefail && \
xcodebuild clean \
test \
-workspace Hero.xcworkspace \
-scheme "${scheme}"" \
-destination "${destination}" \
-configuration "Debug" \
-showBuildTimingSummary \
-parallelizeTargets \
-enableThreadSanitizer YES \
-enableCodeCoverage YES \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
ONLY_ACTIVE_ARCH=YES \
| xcpretty
bash <(curl -s https://codecov.io/bash)
env:
destination: ${{ matrix.run-config.destination }}
scheme: ${{ matrix.run-config.scheme }}
- name: Upload Code Coverage
run: |
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# iOS-legacy:
# name: Test iOS
# runs-on: macOS-latest
# env:
# DEVELOPER_DIR: /Applications/Xcode_10.3.1.app/Contents/Developer
# strategy:
# matrix:
# destination: [
# 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7'
# ]
# steps:
# - name: Checkout
# uses: actions/checkout@master
# - name: iOS - ${{ matrix.destination }}
# run: |
# xcversion simulators --install='iOS 10.3.1'
# pod install
# set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
# bash <(curl -s https://codecov.io/bash)
# env:
# destination: ${{ matrix.destination }}
# - name: Upload Code Coverage
# run: |
# bash <(curl -s https://codecov.io/bash)
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}