Skip to content

Commit 0735f18

Browse files
committed
try out node downgrade
1 parent ba8ad69 commit 0735f18

File tree

4 files changed

+96
-25
lines changed

4 files changed

+96
-25
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Use Node.js
3030
uses: actions/setup-node@v4
3131
with:
32-
node-version: '24.x'
32+
node-version: '22.x'
3333

3434
- name: 📥 Monorepo install
3535
uses: ./.github/actions/yarn-nm-install
@@ -91,7 +91,7 @@ jobs:
9191
- name: Use Node.js
9292
uses: actions/setup-node@v4
9393
with:
94-
node-version: '24.x'
94+
node-version: '22.x'
9595

9696
- name: 📥 Monorepo install
9797
uses: ./.github/actions/yarn-nm-install
@@ -100,8 +100,7 @@ jobs:
100100
cache-install-state: true
101101

102102
- name: Run E2E tests
103-
timeout-minutes: 10
104-
continue-on-error: true
103+
timeout-minutes: 15
105104
run: yarn g:nx test @e2e/${{ matrix.e2e-server }}
106105

107106
- name: Upload Playwright Report
@@ -151,7 +150,7 @@ jobs:
151150
- name: Use Node.js
152151
uses: actions/setup-node@v4
153152
with:
154-
node-version: '24.x'
153+
node-version: '22.x'
155154

156155
- name: 📥 Monorepo install
157156
uses: ./.github/actions/yarn-nm-install
@@ -160,8 +159,7 @@ jobs:
160159
cache-install-state: true
161160

162161
- name: Run snippets tests
163-
timeout-minutes: 10
164-
continue-on-error: true
162+
timeout-minutes: 15
165163
run: yarn g:nx test @snippet/${{ matrix.snippet }}
166164

167165
- name: Upload Playwright Report
@@ -188,7 +186,7 @@ jobs:
188186
- name: Use Node.js
189187
uses: actions/setup-node@v4
190188
with:
191-
node-version: '24.x'
189+
node-version: '22.x'
192190

193191
- name: 📥 Monorepo install
194192
uses: ./.github/actions/yarn-nm-install
@@ -222,7 +220,7 @@ jobs:
222220
- name: Use Node.js
223221
uses: actions/setup-node@v4
224222
with:
225-
node-version: '24.x'
223+
node-version: '22.x'
226224

227225
- name: 📥 Monorepo install
228226
uses: ./.github/actions/yarn-nm-install
@@ -231,8 +229,7 @@ jobs:
231229
cache-install-state: true
232230

233231
- name: Run E2E tests
234-
timeout-minutes: 10
235-
continue-on-error: true
232+
timeout-minutes: 15
236233
run: yarn g:nx test @e2e/${{ matrix.e2e-server }}
237234

238235
- name: Upload Playwright Report
@@ -264,7 +261,7 @@ jobs:
264261
- name: Use Node.js
265262
uses: actions/setup-node@v4
266263
with:
267-
node-version: '24.x'
264+
node-version: '22.x'
268265

269266
- name: 📥 Monorepo install
270267
uses: ./.github/actions/yarn-nm-install
@@ -273,8 +270,7 @@ jobs:
273270
cache-install-state: true
274271

275272
- name: Run snippets tests
276-
timeout-minutes: 10
277-
continue-on-error: true
273+
timeout-minutes: 15
278274
run: yarn nx test @snippet/${{ matrix.snippet }}
279275

280276
- name: Upload Playwright Report
@@ -332,10 +328,10 @@ jobs:
332328
steps:
333329
- uses: actions/checkout@v4
334330

335-
- name: Use node version 24
331+
- name: Use node version 22
336332
uses: actions/setup-node@v4
337333
with:
338-
node-version: '24.x'
334+
node-version: '22.x'
339335

340336
- name: Get npm cache directory
341337
id: npm-cache-dir

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1+
node_modules
2+
*.log
3+
dist
4+
test-lib/**/*.js
5+
coverage
6+
.history
7+
.nyc_output
8+
.idea
9+
.vscode
10+
.next
11+
firebase.json
12+
temp
13+
yarn-error.log
14+
.build
15+
Pods/
16+
17+
**/xcuserdata/*
18+
**/build/*
19+
20+
**/.pnp.*
21+
**/.yarn/*
22+
!**/.yarn/patches
23+
!**/.yarn/plugins
24+
!**/.yarn/releases
25+
!**/.yarn/sdks
26+
!**/.yarn/versions
27+
28+
# macOS
29+
.DS_Store
30+
31+
.cache
32+
.rpt2_cache/
33+
34+
.env
35+
.vercel
36+
37+
.nx/cache
38+
.nx-cache
39+
.nx/workspace-data
40+
41+
!packages/sdks/e2e/react-native-74/.eas/build/*
142
/nbproject/
243
/.idea/*
344
*.tmlanguage.cache

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v24.4.1
1+
v22.12.0

packages/sdks-tests/playwright.config.ts

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ const testType = TestTypeEnum.parse(process.env.TEST_TYPE);
4242
*/
4343
const IS_DEV_MODE = process.env.TEST_ENV === 'dev';
4444

45+
/**
46+
* Default timeout for webServer startup (in milliseconds).
47+
* This prevents tests from hanging indefinitely if a server fails to start.
48+
*/
49+
const WEB_SERVER_TIMEOUT = 60 * 1000; // 60 seconds
50+
4551
export default defineConfig({
4652
testDir: getDirName() + `/src/${testType}-tests`,
4753
// testMatch: '**/*.ts',
@@ -56,10 +62,27 @@ export default defineConfig({
5662
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
5763
reporter: [[process.env.CI ? 'github' : 'list'], ['html']],
5864

65+
/**
66+
* Global timeout for the entire test run.
67+
* This prevents CI from hanging indefinitely.
68+
* 10 minutes should be enough for all tests to complete.
69+
*/
70+
globalTimeout: process.env.CI ? 10 * 60 * 1000 : undefined,
71+
72+
/**
73+
* Timeout for each individual test.
74+
* 30 seconds for e2e tests, 60 seconds for snippet tests.
75+
*/
76+
timeout: testType === 'snippet' ? 60000 : 30000,
77+
5978
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
6079
use: {
6180
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
6281
trace: 'on',
82+
/* Action timeout - how long to wait for actions like click, fill, etc. */
83+
actionTimeout: 10000,
84+
/* Navigation timeout - how long to wait for page.goto and similar */
85+
navigationTimeout: 30000,
6386
},
6487

6588
expect: {
@@ -86,19 +109,30 @@ export default defineConfig({
86109
})),
87110

88111
webServer: things
89-
.map(({ packageName, port, portFlag }) => ({
90-
command: `PORT=${port} yarn workspace @${testType}/${packageName} ${IS_DEV_MODE ? 'dev' : 'serve'} ${portFlag}`,
91-
port,
92-
reuseExistingServer: false,
93-
...(packageName === 'react-native-74' || packageName === 'react-native-76-fabric'
94-
? { timeout: 120 * 1000 }
95-
: {}),
96-
}))
112+
.map(({ packageName, port, portFlag }) => {
113+
// React Native servers take longer to start
114+
const isReactNative =
115+
packageName === 'react-native-74' || packageName === 'react-native-76-fabric';
116+
const timeout = isReactNative ? 120 * 1000 : WEB_SERVER_TIMEOUT;
117+
118+
return {
119+
command: `PORT=${port} yarn workspace @${testType}/${packageName} ${IS_DEV_MODE ? 'dev' : 'serve'} ${portFlag}`,
120+
port,
121+
reuseExistingServer: false,
122+
timeout,
123+
// Log stdout/stderr to help debug server startup issues
124+
stdout: 'pipe' as const,
125+
stderr: 'pipe' as const,
126+
};
127+
})
97128
.concat([
98129
{
99130
command: `PORT=${EMBEDDER_PORT} yarn workspace @sdk/tests run-embedder`,
100131
port: EMBEDDER_PORT,
101132
reuseExistingServer: false,
133+
timeout: WEB_SERVER_TIMEOUT,
134+
stdout: 'pipe' as const,
135+
stderr: 'pipe' as const,
102136
},
103137
]),
104138
});

0 commit comments

Comments
 (0)