Skip to content

Commit 9c9faf1

Browse files
authored
chore(test-app): fix CI build
* ci: fix android * chore(test-app): don't touch gradle version * chore(test-app): fix to [email protected] * chore(test-app): link JSC to iOS project * chore(e2e): better timeout logic * chore(test-app): 5 seconds interval
1 parent 2d27747 commit 9c9faf1

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
test-android:
9696
<<: *job
9797
docker:
98-
- image: circleci/android:api-26-node8-alpha
98+
- image: circleci/android:api-26-node
9999
steps:
100100
- checkout
101101
- *getDeps

packages/test-app/e2e/main.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,15 @@ const callProperties = {
4040

4141
async function hasMatchingCall(type, name, props) {
4242
const properties = callProperties[type]
43+
const interval = 10 * 1000 // 10 seconds
44+
const timeout = 5 * 60 * 1000 // 5 minutes
45+
const start = Date.now()
4346

4447
if (!properties) {
4548
throw new Error(`Unknown call type ${type}`)
4649
}
4750

48-
for (let i = 0; i < 10; i++) {
51+
while (Date.now() - start < timeout) {
4952
const headers = {
5053
Authorization: 'Basic ' + Buffer.from(E2E_TOKEN + ':').toString('base64')
5154
}
@@ -68,7 +71,7 @@ async function hasMatchingCall(type, name, props) {
6871
return
6972
}
7073

71-
await sleep(1000)
74+
await sleep(interval)
7275
}
7376

7477
throw new Error('Cannot find call')

packages/test-app/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ integrations_require=""
88

99
rm -rf project
1010

11-
yarn react-native init project
11+
yarn react-native init project [email protected]
1212

1313
cp -r src/* project/
1414
cd project

packages/test-app/src/project.xcodeproj/project.pbxproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
3737
2DCD954D1E0B4F2C00145EB5 /* projectTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* projectTests.m */; };
3838
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
39+
4B24FA70224D445500D16B87 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B24FA6F224D445500D16B87 /* JavaScriptCore.framework */; };
3940
4B8D0EA721BF5D040019C020 /* Analytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8D0EA621BF5D040019C020 /* Analytics.framework */; };
4041
4B8D0EA821BF5D040019C020 /* Analytics.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8D0EA621BF5D040019C020 /* Analytics.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
4142
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
@@ -363,6 +364,7 @@
363364
2D02E47B1E0B4A5D006451C7 /* project-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "project-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
364365
2D02E4901E0B4A5D006451C7 /* project-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "project-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
365366
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
367+
4B24FA6F224D445500D16B87 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
366368
4B8D0EA021BF3E2F0019C020 /* Analytics.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Analytics.framework; sourceTree = BUILT_PRODUCTS_DIR; };
367369
4B8D0EA221BF5C890019C020 /* Analytics.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Analytics.framework; sourceTree = BUILT_PRODUCTS_DIR; };
368370
4B8D0EA621BF5D040019C020 /* Analytics.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Analytics.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -387,6 +389,7 @@
387389
isa = PBXFrameworksBuildPhase;
388390
buildActionMask = 2147483647;
389391
files = (
392+
4B24FA70224D445500D16B87 /* JavaScriptCore.framework in Frameworks */,
390393
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
391394
11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */,
392395
146834051AC3E58100842450 /* libReact.a in Frameworks */,
@@ -549,6 +552,7 @@
549552
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
550553
isa = PBXGroup;
551554
children = (
555+
4B24FA6F224D445500D16B87 /* JavaScriptCore.framework */,
552556
4B8D0EA021BF3E2F0019C020 /* Analytics.framework */,
553557
2D16E6891FA4F8E400B85C8A /* libReact.a */,
554558
);
@@ -760,6 +764,7 @@
760764
developmentRegion = English;
761765
hasScannedForEncodings = 0;
762766
knownRegions = (
767+
English,
763768
en,
764769
Base,
765770
);

packages/test-app/test_android.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ pushd project
66
pushd android
77
export GRADLE_OPTS="-Xmx1024m"
88

9-
# Upgrade the Gradle wrapper to 4.6
10-
./gradlew wrapper --gradle-version=4.6
11-
129
yarn react-native link
1310
popd
1411
popd

0 commit comments

Comments
 (0)