-
-
Notifications
You must be signed in to change notification settings - Fork 55
79 lines (69 loc) · 1.83 KB
/
verify-ios.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
name: ✨ Validate iOS
on:
push:
branches:
- main
paths:
- ".github/workflows/verify-ios.yml"
- "ios/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/verify-ios.yml"
- "ios/**"
jobs:
swift-lint:
runs-on: ubuntu-latest
name: 🔎 Swift Lint
steps:
- uses: actions/checkout@v4
- name: Run SwiftLint GitHub Action (--strict)
uses: norio-nomura/action-swiftlint@master
with:
args: --strict
env:
WORKING_DIRECTORY: ios
format:
runs-on: macOS-14
name: 📚 Swift Format
defaults:
run:
working-directory: ./ios
steps:
- uses: actions/checkout@v4
- name: Install SwiftFormat
run: brew install swiftformat
- name: Format Swift code
run: swiftformat --verbose .
- name: Verify that the formatted code hasn't been changed
run: git diff --exit-code HEAD
objc-lint:
runs-on: macOS-14
name: 🔎 ObjC Lint
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Verify formatting
run: yarn lint-clang
unit-tests:
name: 📖 Unit tests
runs-on: macOS-14
defaults:
run:
working-directory: ./ios/KeyboardControllerNative
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15.4"
- name: Install xcpretty
run: gem install xcpretty
- name: Run unit tests
run: "set -o pipefail && xcodebuild \
test \
-scheme KeyboardControllerNative \
-only-testing KeyboardControllerNativeTests \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro' \
CODE_SIGNING_ALLOWED=NO | xcpretty"