-
Notifications
You must be signed in to change notification settings - Fork 48
140 lines (113 loc) · 4.21 KB
/
check-pr.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Verify PR
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- 'main'
- 'develop'
- 'release/*'
env:
destination: "platform=iOS Simulator,name=iPhone 14 Pro,OS=latest"
configuration: "Debug"
noIndex: "COMPILER_INDEX_STORE_ENABLE=NO"
noSigning: "CODE_SIGNING_ALLOWED=NO"
versionXcode: "14.3.1"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: SwiftLint
runs-on: macos-13-large
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Lint Edited Files
run: bash .github/scripts/lintEditedFiles.sh
checkout:
name: Checkout Verification
runs-on: macos-13-xlarge
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Select Xcode
run: |
sudo xcode-select -switch /Applications/Xcode_${versionXcode}.app
- name: Log xcodebuild Version
run: |
xcodebuild -version
- name: Run Checkout Tests
run: |
set -o pipefail && xcodebuild -scheme "${scheme}" test -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
env:
scheme: CheckoutTests
- name: Build Checkout SPM Test Project
run: |
set -o pipefail && xcodebuild "build" "-project" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty
env:
path: "Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj"
scheme: "CheckoutSPMSample"
- name: Checkout Pod Update
run: |
cd Checkout/Samples/CocoapodsSample
pod update
- name: Build Checkout CocoaPods Test Project
run: |
set -o pipefail && xcodebuild "build" "-workspace" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty
env:
path: "Checkout/Samples/CocoapodsSample/CheckoutCocoapodsSample.xcworkspace"
scheme: "CheckoutCocoapodsSample"
frames:
name: Frames Verification
runs-on: macos-13-xlarge
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Select Xcode
run: |
sudo xcode-select -switch /Applications/Xcode_${versionXcode}.app
- name: Log xcodebuild Version
run: |
xcodebuild -version
- name: Run Frames Unit Tests
run: |
set -o pipefail && xcodebuild -scheme "${scheme}" test -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
env:
scheme: "FramesTests"
- name: Build Frames SPM Test Project
run: |
set -o pipefail && xcodebuild "build" "-project" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty
env:
path: "iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj"
scheme: "iOS Example Frame"
- name: Frames Pod Update
run: |
cd iOS\ Example\ Frame
pod update
- name: Build Frames CocoaPods Test Project
run: |
set -o pipefail && xcodebuild "build" "-workspace" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty
env:
path: "iOS Example Frame/iOS Example Frame.xcworkspace"
scheme: "iOS Example Frame"
run-ui-tests:
name: Run UI Tests
runs-on: macos-12-xl
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Select Xcode
run: |
sudo xcode-select -switch /Applications/Xcode_14.2.app
- name: Log xcodebuild Version
run: |
xcodebuild -version
- name: Run UI Tests
run: |
set -o pipefail && xcodebuild test "-project" "${path}" "-scheme" "${scheme}" "-configuration" "${scheme}" "-destination" "${destination}" | xcpretty
env:
path: "iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj"
scheme: "UITest"