-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (127 loc) · 3.63 KB
/
Copy pathci.yml
File metadata and controls
153 lines (127 loc) · 3.63 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
name: CI
on:
pull_request:
push:
branches:
- dev
- main
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
swiftlint:
name: SwiftLint
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install SwiftLint
run: |
if ! command -v swiftlint >/dev/null 2>&1; then
brew install swiftlint
fi
- name: Lint
run: swiftlint lint --strict
crdt-runtime:
name: CRDT runtime drift
runs-on: macos-26
defaults:
run:
working-directory: Tools/CRDTRuntime
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: Tools/CRDTRuntime/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build runtime
run: npm run build
- name: Verify generated bundle is committed
working-directory: .
run: git diff --exit-code -- docmostly/DocmostlyCRDTRuntime.js
- name: Audit runtime dependencies
run: npm audit --audit-level=high
ios-unit-tests:
name: iOS unit tests
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Show Xcode version
run: xcodebuild -version
- name: Create iOS simulator
id: ios-simulator
run: |
set -euo pipefail
destination="$(python3 .github/scripts/create-ios-simulator-destination.py)"
echo "Using $destination"
echo "destination=$destination" >> "$GITHUB_OUTPUT"
- name: Test
run: |
result_bundle="$RUNNER_TEMP/docmostly-ios-tests.xcresult"
set +e
xcodebuild test \
-project docmostly.xcodeproj \
-scheme docmostly \
-destination '${{ steps.ios-simulator.outputs.destination }}' \
-resultBundlePath "$result_bundle" \
CODE_SIGNING_ALLOWED=NO
test_status=$?
set -e
if [ "$test_status" -ne 0 ]; then
xcrun xcresulttool get test-results summary \
--path "$result_bundle" \
--compact
fi
exit "$test_status"
ipad-build:
name: iPad build
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Show Xcode version
run: xcodebuild -version
- name: Build
run: |
xcodebuild build \
-project docmostly.xcodeproj \
-scheme docmostly \
-destination 'generic/platform=iOS Simulator' \
CODE_SIGNING_ALLOWED=NO
macos-unit-tests:
name: macOS unit tests
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Show Xcode version
run: xcodebuild -version
- name: Test
run: |
xcodebuild test \
-project docmostly.xcodeproj \
-scheme DocmostlyMac \
-destination 'platform=macOS' \
CODE_SIGNING_ALLOWED=NO
hygiene:
name: Git hygiene
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Check whitespace
run: git diff --check
- name: Ensure vendored node_modules are not tracked
run: |
tracked_modules="$(git ls-files 'Tools/CRDTRuntime/node_modules/**')"
if [ -n "$tracked_modules" ]; then
echo "$tracked_modules"
exit 1
fi