Skip to content

Commit f6b4396

Browse files
CopilotSaadnajmi
andcommitted
feat: add GitHub Actions PR workflow mirroring Azure Pipelines PR checks
Co-authored-by: Saadnajmi <6722175+Saadnajmi@users.noreply.github.com>
1 parent b480a8e commit f6b4396

1 file changed

Lines changed: 301 additions & 0 deletions

File tree

.github/workflows/pr.yml

Lines changed: 301 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,301 @@
1+
name: PR
2+
on: pull_request
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true
7+
8+
jobs:
9+
js:
10+
name: JS PR
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 60
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup the toolchain
20+
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@4.4.5
21+
with:
22+
node-version: 22
23+
24+
- name: Install dependencies
25+
run: yarn
26+
27+
- name: Check change files
28+
run: yarn checkchange
29+
30+
- name: Check prettier
31+
run: yarn prettier
32+
33+
- name: Run lint-lockfile
34+
run: yarn lint-lockfile
35+
36+
- name: Build CI
37+
run: yarn buildci
38+
39+
- name: Verify API and ensure changed files
40+
run: yarn check-for-changed-files
41+
42+
android:
43+
name: Android PR
44+
runs-on: macos-latest
45+
timeout-minutes: 60
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
50+
- name: Setup the toolchain
51+
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@4.4.5
52+
with:
53+
platform: android
54+
node-version: 22
55+
56+
- name: Install dependencies
57+
run: yarn
58+
59+
- name: Build packages
60+
run: yarn build
61+
62+
- name: Bundle Android
63+
run: yarn bundle:android
64+
working-directory: apps/fluent-tester
65+
66+
# Android E2E tests are currently disabled
67+
# - name: Build Android APK
68+
# ...
69+
# - name: Run E2E Android tests
70+
# ...
71+
72+
macos:
73+
name: macOS PR
74+
runs-on: macos-15
75+
timeout-minutes: 60
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v4
79+
80+
- name: Setup the toolchain
81+
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@4.4.5
82+
with:
83+
platform: macos
84+
node-version: 22
85+
xcode-developer-dir: /Applications/Xcode_16.4.app
86+
87+
- name: Install dependencies
88+
run: yarn
89+
90+
- name: Build packages
91+
run: yarn build
92+
93+
- name: Bundle macOS
94+
run: |
95+
set -eox pipefail
96+
yarn bundle:macos
97+
working-directory: apps/fluent-tester
98+
99+
- name: Pod install
100+
run: |
101+
set -eox pipefail
102+
pod install --verbose
103+
working-directory: apps/fluent-tester/macos
104+
105+
- name: Build macOS app
106+
run: |
107+
set -eox pipefail
108+
./.ado/scripts/xcodebuild.sh apps/fluent-tester/macos/FluentTester.xcworkspace macosx ReactTestApp build
109+
env:
110+
CCACHE_DISABLE: 1
111+
112+
- name: Prepare E2E macOS tests
113+
run: yarn e2eprep:macos
114+
working-directory: apps/E2E
115+
116+
- name: Run E2E macOS tests
117+
run: yarn e2etest:macos
118+
working-directory: apps/E2E
119+
120+
- name: Upload E2E macOS artifacts
121+
if: ${{ always() }}
122+
uses: actions/upload-artifact@v4
123+
with:
124+
name: E2E_macos_Dump
125+
path: |
126+
apps/E2E/reports
127+
apps/E2E/errorShots
128+
129+
ios:
130+
name: iOS PR
131+
runs-on: macos-15
132+
timeout-minutes: 60
133+
steps:
134+
- name: Checkout
135+
uses: actions/checkout@v4
136+
137+
- name: Setup the toolchain
138+
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@4.4.5
139+
with:
140+
platform: ios
141+
node-version: 22
142+
xcode-developer-dir: /Applications/Xcode_16.4.app
143+
144+
- name: Install dependencies
145+
run: yarn
146+
147+
- name: Build packages
148+
run: yarn build
149+
150+
- name: Bundle iOS
151+
run: |
152+
set -eox pipefail
153+
yarn bundle:ios
154+
working-directory: apps/fluent-tester
155+
156+
- name: Pod install
157+
run: |
158+
set -eox pipefail
159+
pod install --verbose
160+
working-directory: apps/fluent-tester/ios
161+
162+
- name: Build iOS app
163+
run: |
164+
set -eox pipefail
165+
./.ado/scripts/xcodebuild.sh apps/fluent-tester/ios/FluentTester.xcworkspace iphonesimulator ReactTestApp build
166+
env:
167+
CCACHE_DISABLE: 1
168+
169+
# iOS E2E tests are currently disabled
170+
# - name: Prepare E2E iOS tests
171+
# run: yarn e2eprep:ios
172+
# working-directory: apps/E2E
173+
# - name: Run E2E iOS tests
174+
# run: yarn e2etest:ios
175+
# working-directory: apps/E2E
176+
177+
windows:
178+
name: Windows PR
179+
runs-on: windows-latest
180+
timeout-minutes: 60
181+
steps:
182+
- name: Checkout
183+
uses: actions/checkout@v4
184+
with:
185+
fetch-depth: 5
186+
187+
- name: Setup the toolchain
188+
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@4.4.5
189+
with:
190+
platform: windows
191+
node-version: 22
192+
193+
- name: Install dependencies
194+
run: yarn
195+
196+
- name: Build packages
197+
run: yarn build
198+
199+
- name: Bundle Windows
200+
run: yarn bundle:windows
201+
working-directory: apps/fluent-tester
202+
203+
- name: Install WinAppDriver 1.1
204+
run: |
205+
Invoke-WebRequest https://github.com/microsoft/WinAppDriver/releases/download/v1.1/WindowsApplicationDriver.msi -OutFile $env:RUNNER_TEMP\WinAppDriver.msi
206+
Start-Process msiexec -ArgumentList "/quiet","/x","{087BBF93-D9E3-4D27-BDBE-9C702E0066FC}" -Verb runAs -Wait
207+
Start-Process msiexec -ArgumentList "/quiet","/i","$env:RUNNER_TEMP\WinAppDriver.msi" -Verb runAs -Wait
208+
shell: powershell
209+
210+
- name: Generate UWP app
211+
run: yarn install-windows-test-app
212+
working-directory: apps/fluent-tester
213+
214+
- name: Build UWP app
215+
run: yarn windows --arch x64 --logging --no-packager --no-launch
216+
working-directory: apps/fluent-tester
217+
218+
- name: Prepare E2E Windows tests
219+
run: yarn e2eprep:windows
220+
working-directory: apps/E2E
221+
222+
- name: Run E2E UWP tests
223+
run: yarn e2etest:windows
224+
working-directory: apps/E2E
225+
226+
- name: Upload E2E Windows artifacts
227+
if: ${{ always() }}
228+
uses: actions/upload-artifact@v4
229+
with:
230+
name: E2E_UWP_Dump
231+
path: |
232+
apps/E2E/reports
233+
apps/E2E/errorShots
234+
235+
win32:
236+
name: Win32 PR
237+
runs-on: windows-latest
238+
timeout-minutes: 60
239+
steps:
240+
- name: Checkout
241+
uses: actions/checkout@v4
242+
243+
- name: Setup the toolchain
244+
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@4.4.5
245+
with:
246+
platform: windows
247+
node-version: 22
248+
249+
- name: Install dependencies
250+
run: yarn
251+
252+
- name: Build packages
253+
run: yarn build
254+
255+
- name: Bundle Win32
256+
run: yarn bundle
257+
working-directory: apps/win32
258+
259+
- name: Install WinAppDriver 1.1
260+
run: |
261+
Invoke-WebRequest https://github.com/microsoft/WinAppDriver/releases/download/v1.1/WindowsApplicationDriver.msi -OutFile $env:RUNNER_TEMP\WinAppDriver.msi
262+
Start-Process msiexec -ArgumentList "/quiet","/x","{087BBF93-D9E3-4D27-BDBE-9C702E0066FC}" -Verb runAs -Wait
263+
Start-Process msiexec -ArgumentList "/quiet","/i","$env:RUNNER_TEMP\WinAppDriver.msi" -Verb runAs -Wait
264+
shell: powershell
265+
266+
- name: Prepare E2E Win32 tests
267+
run: yarn e2eprep:win32
268+
working-directory: apps/E2E
269+
270+
- name: Run E2E Win32 tests
271+
run: yarn e2etest:win32
272+
working-directory: apps/E2E
273+
274+
- name: Upload E2E Win32 artifacts
275+
if: ${{ always() }}
276+
uses: actions/upload-artifact@v4
277+
with:
278+
name: E2E_win32_Dump
279+
path: |
280+
apps/E2E/reports
281+
apps/E2E/errorShots
282+
283+
test-links:
284+
name: Test repo links
285+
runs-on: ubuntu-latest
286+
timeout-minutes: 60
287+
steps:
288+
- name: Checkout
289+
uses: actions/checkout@v4
290+
291+
- name: Setup the toolchain
292+
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@4.4.5
293+
with:
294+
node-version: 22
295+
296+
- name: Install dependencies
297+
run: yarn
298+
299+
- name: Test markdown links
300+
run: |
301+
find . -name \*.md -not -name CHANGELOG.md -not -path '*/node_modules/*' -print0 | xargs -0 -n1 yarn test-links -c $(pwd)/.ado/markdown-link-check-config.json

0 commit comments

Comments
 (0)