-
Notifications
You must be signed in to change notification settings - Fork 76
112 lines (87 loc) · 3.38 KB
/
main.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
name: CI
on: push
jobs:
test:
name: Test on ${{ matrix.platform.os }} using Xcode ${{ matrix.xcode }}
runs-on: macos-latest
env:
xcodeproj: SimpleKeychain.xcodeproj
strategy:
matrix:
platform:
- { os: iOS, scheme: SimpleKeychain-iOS }
- { os: macOS, scheme: SimpleKeychain-macOS }
- { os: tvOS, scheme: SimpleKeychain-tvOS }
xcode:
- '14.2'
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Set up environment
uses: ./.github/actions/setup
with:
xcode: ${{ matrix.xcode }}
- name: Run tests
uses: ./.github/actions/test
with:
xcode: ${{ matrix.xcode }}
scheme: ${{ matrix.platform.scheme }}
platform: ${{ matrix.platform.os }}
- name: Convert coverage report
if: ${{ matrix.platform.os == 'iOS' }}
run: bundle exec slather coverage -x --scheme ${{ matrix.platform.scheme }} ${{ env.xcodeproj }}
- name: Upload coverage report
if: ${{ matrix.platform.os == 'iOS' }}
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
- name: Cancel wokflow on failure
uses: andymckay/cancel-action@b9280e3f8986d7a8e91c7462efc0fa318010c8b1
if: ${{ failure() }}
test-package:
name: Test Swift package using Xcode ${{ matrix.xcode }}
runs-on: macos-latest
strategy:
matrix:
xcode:
- '14.2'
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Set up environment
uses: ./.github/actions/setup
with:
xcode: ${{ matrix.xcode }}
- name: Run tests
run: swift test
- name: Cancel wokflow on failure
uses: andymckay/cancel-action@b9280e3f8986d7a8e91c7462efc0fa318010c8b1
if: ${{ failure() }}
pod-lint:
name: Lint podspec using Xcode ${{ matrix.xcode }}
runs-on: macos-latest
strategy:
matrix:
xcode:
- '14.2'
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Set up environment
uses: ./.github/actions/setup
with:
xcode: ${{ matrix.xcode }}
- name: Run pod lib lint
run: bundle exec pod lib lint --allow-warnings --fail-fast
- name: Cancel wokflow on failure
uses: andymckay/cancel-action@b9280e3f8986d7a8e91c7462efc0fa318010c8b1
if: ${{ failure() }}
swiftlint:
name: Lint code with SwiftLint
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Run SwiftLint
run: swiftlint lint --reporter github-actions-logging
- name: Cancel wokflow on failure
uses: andymckay/cancel-action@b9280e3f8986d7a8e91c7462efc0fa318010c8b1
if: ${{ failure() }}