-
Notifications
You must be signed in to change notification settings - Fork 171
402 lines (329 loc) · 10.5 KB
/
pr.yml
File metadata and controls
402 lines (329 loc) · 10.5 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
name: PR
on: pull_request
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
js:
name: JS PR
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
node-version: 22
- name: Install dependencies
run: yarn
- name: Build CI
run: yarn lage buildci
android:
name: Android PR
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
platform: android
node-version: 22
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn build
- name: Bundle Android
run: yarn bundle:android
working-directory: apps/fluent-tester
# Android E2E tests are currently disabled
# - name: Build Android APK
# ...
# - name: Run E2E Android tests
# ...
macos:
name: macOS PR
runs-on: macos-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
platform: macos
node-version: 22
xcode-developer-dir: /Applications/Xcode_16.4.app
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn build
- name: Bundle macOS
run: |
set -eox pipefail
yarn bundle:macos
working-directory: apps/fluent-tester
- name: Pod install
run: |
set -eox pipefail
pod install --verbose
working-directory: apps/fluent-tester/macos
- name: Build macOS app
run: ./.github/scripts/xcodebuild.mts apps/fluent-tester/macos/FluentTester.xcworkspace macosx ReactTestApp build
env:
CCACHE_DISABLE: 1
- name: Prepare E2E macOS tests
run: yarn e2eprep:macos
working-directory: apps/E2E
- name: Run E2E macOS tests
run: yarn e2etest:macos
working-directory: apps/E2E
- name: Upload E2E macOS artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: E2E_macos_Dump
path: |
apps/E2E/reports
apps/E2E/errorShots
ios:
name: iOS PR
runs-on: macos-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
platform: ios
node-version: 22
xcode-developer-dir: /Applications/Xcode_16.4.app
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn build
- name: Bundle iOS
run: |
set -eox pipefail
yarn bundle:ios
working-directory: apps/fluent-tester
- name: Pod install
run: |
set -eox pipefail
pod install --verbose
working-directory: apps/fluent-tester/ios
- name: Build iOS app
run: ./.github/scripts/xcodebuild.mts apps/fluent-tester/ios/FluentTester.xcworkspace iphonesimulator ReactTestApp build
env:
CCACHE_DISABLE: 1
# iOS E2E tests are currently disabled
# - name: Prepare E2E iOS tests
# run: yarn e2eprep:ios
# working-directory: apps/E2E
# - name: Run E2E iOS tests
# run: yarn e2etest:ios
# working-directory: apps/E2E
windows:
name: Windows PR
runs-on: windows-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
platform: windows
node-version: 22
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn build
- name: Bundle Windows
run: yarn bundle:windows
working-directory: apps/fluent-tester
- name: Install WinAppDriver 1.1
run: |
Invoke-WebRequest https://github.com/microsoft/WinAppDriver/releases/download/v1.1/WindowsApplicationDriver.msi -OutFile $env:RUNNER_TEMP\WinAppDriver.msi
Start-Process msiexec -ArgumentList "/quiet","/x","{087BBF93-D9E3-4D27-BDBE-9C702E0066FC}" -Verb runAs -Wait
Start-Process msiexec -ArgumentList "/quiet","/i","$env:RUNNER_TEMP\WinAppDriver.msi" -Verb runAs -Wait
shell: powershell
- name: Generate UWP app
run: yarn install-windows-test-app --use-nuget
working-directory: apps/fluent-tester
- name: Build UWP app
run: yarn windows --arch x64 --logging --no-packager --no-launch --msbuildprops WindowsTargetPlatformVersion=10.0.26100.0
working-directory: apps/fluent-tester
- name: Prepare E2E Windows tests
run: yarn e2eprep:windows
working-directory: apps/E2E
- name: Run E2E UWP tests
run: yarn e2etest:windows
working-directory: apps/E2E
- name: Upload E2E Windows artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: E2E_UWP_Dump
path: |
apps/E2E/reports
apps/E2E/errorShots
win32:
name: Win32 PR
runs-on: windows-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
platform: windows
node-version: 22
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn build
- name: Bundle Win32
run: yarn bundle
working-directory: apps/win32
- name: Install WinAppDriver 1.1
run: |
Invoke-WebRequest https://github.com/microsoft/WinAppDriver/releases/download/v1.1/WindowsApplicationDriver.msi -OutFile $env:RUNNER_TEMP\WinAppDriver.msi
Start-Process msiexec -ArgumentList "/quiet","/x","{087BBF93-D9E3-4D27-BDBE-9C702E0066FC}" -Verb runAs -Wait
Start-Process msiexec -ArgumentList "/quiet","/i","$env:RUNNER_TEMP\WinAppDriver.msi" -Verb runAs -Wait
shell: powershell
- name: Prepare E2E Win32 tests
run: yarn e2eprep:win32
working-directory: apps/E2E
- name: Run E2E Win32 tests
run: yarn e2etest:win32
working-directory: apps/E2E
- name: Upload E2E Win32 artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: E2E_win32_Dump
path: |
apps/E2E/reports
apps/E2E/errorShots
check-changesets:
name: Check for Changesets
runs-on: ubuntu-latest
# Skip this check for the version bump PR created by changesets
if: ${{ github.head_ref != 'changeset-release/main' }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
filter: blob:none
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'yarn'
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Validate changesets
run: yarn change:check
publish-dry-run-pack:
name: NPM Publish Dry Run — Pack
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
has-tarballs: ${{ steps.check.outputs.has-tarballs }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
node-version: 22
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn build
- name: Pack packages
run: yarn lage pack --verbose --grouped
- name: List packed tarballs
id: check
run: |
ls -la _packed/
if ls _packed/*.tgz > /dev/null 2>&1; then
echo "has-tarballs=true" >> $GITHUB_OUTPUT
else
echo "has-tarballs=false" >> $GITHUB_OUTPUT
fi
- name: Upload packed tarballs
if: steps.check.outputs.has-tarballs == 'true'
uses: actions/upload-artifact@v4
with:
name: packed-tarballs-dry-run
path: _packed/
publish-dry-run:
name: NPM Publish Dry Run — Publish
runs-on: ubuntu-latest
timeout-minutes: 60
needs: publish-dry-run-pack
if: needs.publish-dry-run-pack.outputs.has-tarballs == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
node-version: 22
- name: Install dependencies
run: yarn
- name: Download packed tarballs
uses: actions/download-artifact@v4
with:
name: packed-tarballs-dry-run
path: _packed/
- name: Simulate publish
run: yarn lage publish:dry-run --verbose --grouped
test-links:
name: Test repo links
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14
with:
node-version: 22
- name: Install dependencies
run: yarn
- name: Test markdown links
run: |
find . -name \*.md -not -name CHANGELOG.md -not -path '*/node_modules/*' -print0 | xargs -0 -n1 yarn test-links -c $(pwd)/.github/markdown-link-check-config.json
pr:
name: PR
runs-on: ubuntu-latest
needs:
- js
- android
- macos
- ios
- windows
- win32
- check-changesets
- publish-dry-run-pack
- publish-dry-run
- test-links
steps:
- name: All required jobs passed
run: echo "All required jobs completed."