-
Notifications
You must be signed in to change notification settings - Fork 351
124 lines (108 loc) · 3.31 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
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
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- "**"
schedule:
- cron: '3 3 * * 2' # 3:03 AM, every Tuesday
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-podspec:
name: lint podspec
runs-on: macos-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # required to be able to find Git tags
- name: Lint podspec
run: |
set -eo pipefail
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
pod lib lint SwiftUIIntrospect.podspec --allow-warnings
ci:
name: ${{ matrix.platform[0] }} ${{ matrix.platform[1] }}
runs-on: ${{ matrix.os || 'macos-13' }}
strategy:
fail-fast: false
matrix:
platform:
- [ios, 13]
- [ios, 14]
- [ios, 15]
- [ios, 16]
- [tvos, 13]
- [tvos, 14]
- [tvos, 15]
- [tvos, 16]
- [macos, 11]
- [macos, 12]
- [macos, 13]
include:
- platform: [ios, 13]
runtime: iOS 13.7
os: macos-12
xcode: 14.2
install: true
- platform: [ios, 14]
runtime: iOS 14.5
install: true
- platform: [ios, 15]
runtime: iOS 15.5
install: true
- platform: [ios, 16]
runtime: iOS 16.4
install: false
- platform: [tvos, 13]
runtime: tvOS 13.4
os: macos-12
xcode: 14.2
install: true
- platform: [tvos, 14]
runtime: tvOS 14.5
install: true
- platform: [tvos, 15]
runtime: tvOS 15.4
install: true
- platform: [tvos, 16]
runtime: tvOS 16.4
install: false
- platform: [macos, 12]
os: macos-12
xcode: 14.2
install: false
- platform: [macos, 13]
os: macos-13
xcode: 14.3
install: false
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Setup tea environment
uses: teaxyz/setup@v0
with:
+: |
github.com/XcodesOrg/xcodes
- name: Select Xcode version
run: sudo xcodes select ${{ matrix.xcode || '14.3' }}
- if: ${{ matrix.install }}
name: Install Required Runtime (${{ matrix.runtime }})
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
command: sudo xcodes runtimes install '${{ matrix.runtime }}'
- name: List Available Runtimes and Simulators
run: xcrun simctl list
- name: Build Showcase
run: fastlane build platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:Showcase
- name: Run Tests
run: fastlane test platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} configuration:Debug
- if: ${{ matrix.platform[0] == 'ios' && matrix.platform[1] >= '14' && matrix.platform[1] <= '16' }}
name: Run UI Tests
run: fastlane test platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:SwiftUIIntrospectUITests configuration:Debug