-
-
Notifications
You must be signed in to change notification settings - Fork 7
84 lines (68 loc) · 2 KB
/
pr_checks.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
name: PR Checks
on: [pull_request]
jobs:
check_versions:
name: Check Versions (Xcode ${{ matrix.xcode }})
runs-on: macos-latest
strategy:
matrix:
xcode:
- "13.2.1"
steps:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- run: ./scripts/check_all_versions_match.swift
swiftlint:
name: SwiftLint (Xcode ${{ matrix.xcode }})
runs-on: macos-latest
strategy:
matrix:
xcode:
- "13.2.1"
steps:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: Install Mint
run: brew install mint
- name: Cache Mint
uses: actions/cache@v3
with:
path: ~/.mint
key: ${{ runner.os }}-mint-xcode_${{ matrix.xcode }}-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-xcode_${{ matrix.xcode }}
- name: Run SwiftLint
run: mint run swiftlint
pod_lib_lint:
name: pod lib lint
runs-on: macos-latest
strategy:
matrix:
xcode:
- "13.2.1"
steps:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: pod lib lint
run: bundle exec pod lib lint
checks_pass:
name: Checks pass
runs-on: ubuntu-latest
needs: [check_versions, swiftlint, pod_lib_lint]
steps:
- run: echo "Checks have passed"
generate_docs:
name: Generate Documentation
runs-on: ubuntu-latest
container:
image: swift:5.6
steps:
- uses: actions/checkout@v2
- name: Generate Documentation
run: ./scripts/generate-documentation.sh ./docs Partial