Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit 2625923

Browse files
committed
Merge branch 'master' into graph-debugging
2 parents f191da9 + 686f70f commit 2625923

68 files changed

Lines changed: 3162 additions & 28840 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/scripts/test-ios.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/e2e-android.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: e2e-android
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'master'
7+
push:
8+
branches:
9+
- 'master'
10+
11+
jobs:
12+
e2e-android:
13+
runs-on: macos-12
14+
timeout-minutes: 120
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 1
21+
22+
- name: Node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: 16
26+
cache: 'yarn' # cache packages, but not node_modules
27+
cache-dependency-path: 'example/yarn.lock'
28+
29+
- name: Cache lib node modules
30+
uses: actions/cache@v3
31+
id: lib-npmcache
32+
with:
33+
path: lib/node_modules
34+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
35+
36+
- name: Install lib dependencies
37+
if: steps.lib-npmcache.outputs.cache-hit != 'true'
38+
working-directory: lib
39+
run: yarn install
40+
41+
- name: Build lib
42+
working-directory: lib
43+
run: yarn build
44+
45+
- name: Use gradle caches
46+
uses: actions/cache@v2
47+
with:
48+
path: ~/.gradle/caches
49+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
50+
restore-keys: |
51+
${{ runner.os }}-gradle-
52+
53+
# - name: Cache node modules
54+
# uses: actions/cache@v3
55+
# id: cache-nm
56+
# with:
57+
# path: node_modules
58+
# key: node-modules-${{ hashFiles('**/yarn.lock') }}
59+
60+
- name: Install node_modules
61+
working-directory: example
62+
run: yarn install && yarn rn-setup
63+
64+
- name: Use specific Java version for sdkmanager to work
65+
uses: actions/setup-java@v2
66+
with:
67+
distribution: 'temurin'
68+
java-version: '11'
69+
70+
- name: Build
71+
working-directory: example
72+
run: yarn e2e:build:android-release
73+
74+
- name: run tests
75+
uses: reactivecircus/android-emulator-runner@v2
76+
with:
77+
api-level: 31
78+
avd-name: Pixel_API_31_AOSP
79+
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
80+
arch: x86_64
81+
disable-animations: true
82+
working-directory: example
83+
script: yarn e2e:test:android-release || yarn e2e:test:android-release || yarn e2e:test:android-release
84+
85+
- uses: actions/upload-artifact@v3
86+
if: failure()
87+
with:
88+
name: e2e-test-videos
89+
path: ./example/artifacts/

.github/workflows/e2e-ios.yml

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,27 @@ on:
44
pull_request:
55
branches:
66
- 'master'
7+
push:
8+
branches:
9+
- 'master'
710

811
jobs:
9-
e2e-test:
10-
name: E2E iOS test
11-
runs-on: macOS-latest
12-
timeout-minutes: 35
12+
e2e-ios:
13+
runs-on: macos-12
14+
timeout-minutes: 120
1315

1416
steps:
15-
- name: Check out Git repository
16-
uses: actions/checkout@v2
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 1
1721

18-
- name: Set up Node.js
19-
uses: actions/setup-node@v1
22+
- name: Node
23+
uses: actions/setup-node@v3
2024
with:
21-
node-version: 14
25+
node-version: 16
26+
cache: 'yarn' # cache packages, but not node_modules
27+
cache-dependency-path: 'example/yarn.lock'
2228

2329
- name: Cache lib node modules
2430
uses: actions/cache@v3
@@ -38,20 +44,25 @@ jobs:
3844

3945
- name: Cache app node modules
4046
uses: actions/cache@v3
41-
id: app-npmcache
47+
id: cache-nm
4248
with:
4349
path: example/node_modules
4450
key: node-modules-${{ hashFiles('**/yarn.lock') }}
4551

4652
- name: Rebuild detox
47-
if: steps.app-npmcache.outputs.cache-hit == 'true'
53+
if: steps.cache-nm.outputs.cache-hit == 'true'
4854
working-directory: example
4955
run: yarn detox clean-framework-cache && yarn detox build-framework-cache
5056

51-
- name: Install app dependencies
52-
if: steps.app-npmcache.outputs.cache-hit != 'true'
57+
- name: Install Dependencies
58+
if: steps.cache-nm.outputs.cache-hit != 'true'
5359
working-directory: example
54-
run: yarn install
60+
run: yarn install && yarn rn-setup
61+
62+
# - name: Activate react-native-skia-stup
63+
# run: |
64+
# yarn add @shopify/react-native-skia@0.1.156 git+ssh://git@github.com/limpbrains/react-native-skia-stub
65+
# patch -p1 < .github/workflows/react-native-skia-stub.patch
5566

5667
- name: Cache Pods
5768
uses: actions/cache@v3
@@ -60,19 +71,27 @@ jobs:
6071
path: example/ios/Pods
6172
key: pods-${{ hashFiles('**/Podfile.lock') }}
6273

63-
- name: Install pods and rn-nodify
74+
- name: Install pods
6475
working-directory: example
6576
run: |
6677
gem update cocoapods xcodeproj
67-
yarn rn-setup
78+
cd ios && pod install && cd ..
6879
69-
- name: Install brew dependencies
70-
run: brew tap wix/brew && brew install applesimutils
80+
- name: Install applesimutils
81+
run: |
82+
brew tap wix/brew
83+
brew install applesimutils
7184
72-
- name: Build iOS app
85+
- name: Build
7386
working-directory: example
74-
run: yarn e2e:ios-build
87+
run: yarn e2e:build:ios-release
7588

7689
- name: Test iOS app
7790
working-directory: example
78-
run: sh ../.github/scripts/test-ios.sh
91+
run: yarn e2e:test:ios-release || yarn e2e:test:ios-release || yarn e2e:test:ios-release
92+
93+
- uses: actions/upload-artifact@v3
94+
if: failure()
95+
with:
96+
name: e2e-test-videos
97+
path: ./example/artifacts/

example/.detoxrc.js

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/** @type {Detox.DetoxConfig} */
2+
module.exports = {
3+
testRunner: {
4+
args: {
5+
'$0': 'jest',
6+
config: 'e2e/jest.config.js'
7+
},
8+
jest: {
9+
setupTimeout: 360000
10+
}
11+
},
12+
apps: {
13+
'ios.debug': {
14+
type: 'ios.app',
15+
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/exmpl.app',
16+
build: 'xcodebuild -workspace ios/exmpl.xcworkspace -scheme exmpl -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build'
17+
},
18+
'ios.release': {
19+
type: 'ios.app',
20+
binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/exmpl.app',
21+
build: 'xcodebuild -workspace ios/exmpl.xcworkspace -scheme exmpl -configuration Release -sdk iphonesimulator -derivedDataPath ios/build'
22+
},
23+
'android.debug': {
24+
type: 'android.apk',
25+
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
26+
build: 'cd android ; ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug ; cd -',
27+
reversePorts: [
28+
8081
29+
]
30+
},
31+
'android.release': {
32+
type: 'android.apk',
33+
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
34+
build: 'cd android ; ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release ; cd -'
35+
}
36+
},
37+
devices: {
38+
simulator: {
39+
type: 'ios.simulator',
40+
device: {
41+
type: 'iPhone 14'
42+
}
43+
},
44+
attached: {
45+
type: 'android.attached',
46+
device: {
47+
adbName: '.*'
48+
}
49+
},
50+
emulator: {
51+
type: 'android.emulator',
52+
device: {
53+
avdName: 'Pixel_API_31_AOSP'
54+
}
55+
}
56+
},
57+
configurations: {
58+
'ios.sim.debug': {
59+
device: 'simulator',
60+
app: 'ios.debug'
61+
},
62+
'ios.sim.release': {
63+
device: 'simulator',
64+
app: 'ios.release'
65+
},
66+
'android.att.debug': {
67+
device: 'attached',
68+
app: 'android.debug'
69+
},
70+
'android.att.release': {
71+
device: 'attached',
72+
app: 'android.release'
73+
},
74+
'android.emu.debug': {
75+
device: 'emulator',
76+
app: 'android.debug'
77+
},
78+
'android.emu.release': {
79+
device: 'emulator',
80+
app: 'android.release'
81+
}
82+
}
83+
};

example/.flowconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ nonstrict-import=warn
5252
deprecated-type=warn
5353
unsafe-getters-setters=warn
5454
unnecessary-invariant=warn
55-
signature-verification-failure=warn
5655

5756
[strict]
5857
deprecated-type
@@ -64,4 +63,4 @@ untyped-import
6463
untyped-type-import
6564

6665
[version]
67-
^0.170.0
66+
^0.182.0

example/.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -29,6 +30,7 @@ build/
2930
local.properties
3031
*.iml
3132
*.hprof
33+
.cxx/
3234

3335
# node.js
3436
#
@@ -49,9 +51,10 @@ buck-out/
4951
# For more information about the recommended setup visit:
5052
# https://docs.fastlane.tools/best-practices/source-control/
5153

52-
*/fastlane/report.xml
53-
*/fastlane/Preview.html
54-
*/fastlane/screenshots
54+
**/fastlane/report.xml
55+
**/fastlane/Preview.html
56+
**/fastlane/screenshots
57+
**/fastlane/test_output
5558

5659
# Bundle artifact
5760
*.jsbundle
@@ -60,4 +63,4 @@ buck-out/
6063
/ios/Pods/
6164
/vendor/bundle/
6265

63-
.watchman*
66+
/artifacts/

example/.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16

example/.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.4
1+
2.7.5

example/App.tsx

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,25 @@ const App = (): ReactElement => {
143143
<Text style={styles.text}>{message}</Text>
144144
</View>
145145
<View style={styles.container}>
146+
<Button
147+
title={'E2E test'}
148+
testID="E2ETest"
149+
onPress={async (): Promise<void> => {
150+
//TODO add more functionality to test
151+
const ldkVersion = await ldk.version();
152+
if (ldkVersion.isErr()) {
153+
return setMessage(ldkVersion.error.message);
154+
}
155+
156+
const nodeIdRes = await ldk.nodeId();
157+
if (nodeIdRes.isErr()) {
158+
return setMessage(nodeIdRes.error.message);
159+
}
160+
161+
return setMessage('e2e success');
162+
}}
163+
/>
164+
146165
<Button
147166
title={'Rebroadcast Known Transactions'}
148167
onPress={async (): Promise<void> => {
@@ -511,24 +530,6 @@ const App = (): ReactElement => {
511530
}}
512531
/>
513532

514-
<Button
515-
title={'E2E test'}
516-
onPress={async (): Promise<void> => {
517-
//TODO add more functionality to test
518-
const ldkVersion = await ldk.version();
519-
if (ldkVersion.isErr()) {
520-
return setMessage(ldkVersion.error.message);
521-
}
522-
523-
const nodeIdRes = await ldk.nodeId();
524-
if (nodeIdRes.isErr()) {
525-
return setMessage(nodeIdRes.error.message);
526-
}
527-
528-
return setMessage('e2e success');
529-
}}
530-
/>
531-
532533
<Button
533534
title={'Backup Current Account'}
534535
onPress={async (): Promise<void> => {

0 commit comments

Comments
 (0)