Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit dc01505

Browse files
Fix ios tests (#2175)
* Increased team waiting time to 60min * Moved setup to the separate task * Test changes * Refactored code; added logs * Changed time from 60 to 30 * Removed test changes
1 parent 4ab8022 commit dc01505

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/react-native-code-push-ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,9 @@ jobs:
4444
run: npm install
4545
- name: Install react-native-cli
4646
run: npm install react-native-cli
47+
- name: Build tests
48+
run: npm run build:tests
49+
- name: Setup tests
50+
run: npm run test:setup:ios
4751
- name: Run tests
48-
run: npm run test:ios
52+
run: npm run test:fast:ios

test/test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,15 @@ class RNProjectManager extends ProjectManager {
308308
}
309309
mkdirp.sync(projectDirectory);
310310

311-
return TestUtil.getProcessOutput("react-native init " + appName, { cwd: projectDirectory })
311+
return TestUtil.getProcessOutput("react-native init " + appName, { cwd: projectDirectory, timeout: 30 * 60 * 1000 })
312+
.then((e) => { console.log(`"react-native init ${appName}" success. cwd=${projectDirectory}`); return e; })
312313
.then(this.copyTemplate.bind(this, templatePath, projectDirectory))
313314
.then<void>(TestUtil.getProcessOutput.bind(undefined, TestConfig.thisPluginInstallString, { cwd: path.join(projectDirectory, TestConfig.TestAppName) }))
314-
.then(() => { return null; });
315+
.then(() => { return null; })
316+
.catch((error) => {
317+
console.log(`"react-native init ${appName} failed". cwd=${projectDirectory}`, error);
318+
throw new Error(error);
319+
});
315320
}
316321

317322
/** JSON mapping project directories to the current scenario

0 commit comments

Comments
 (0)