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

Commit d559282

Browse files
committed
new exmpl project
1 parent 265099d commit d559282

93 files changed

Lines changed: 13880 additions & 22 deletions

File tree

Some content is hidden

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

.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: 'exmpl/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: exmpl
62+
run: yarn install
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: exmpl
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: exmpl
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: ./exmpl/artifacts/

.github/workflows/e2e-ios-old.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: e2e-ios
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'master'
7+
push:
8+
branches:
9+
- 'master'
10+
11+
jobs:
12+
e2e-test:
13+
name: E2E iOS test
14+
runs-on: macos-12
15+
timeout-minutes: 120
16+
17+
steps:
18+
- name: Check out Git repository
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 16
25+
26+
- name: Cache lib node modules
27+
uses: actions/cache@v3
28+
id: lib-npmcache
29+
with:
30+
path: lib/node_modules
31+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
32+
33+
- name: Install lib dependencies
34+
if: steps.lib-npmcache.outputs.cache-hit != 'true'
35+
working-directory: lib
36+
run: yarn install
37+
38+
- name: Build lib
39+
working-directory: lib
40+
run: yarn build
41+
42+
- name: Cache app node modules
43+
uses: actions/cache@v3
44+
id: app-npmcache
45+
with:
46+
path: example/node_modules
47+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
48+
49+
- name: Rebuild detox
50+
if: steps.app-npmcache.outputs.cache-hit == 'true'
51+
working-directory: example
52+
run: yarn detox clean-framework-cache && yarn detox build-framework-cache
53+
54+
- name: Install app dependencies
55+
if: steps.app-npmcache.outputs.cache-hit != 'true'
56+
working-directory: example
57+
run: yarn install
58+
59+
- name: Cache Pods
60+
uses: actions/cache@v3
61+
id: podcache
62+
with:
63+
path: example/ios/Pods
64+
key: pods-${{ hashFiles('**/Podfile.lock') }}
65+
66+
- name: Install pods and rn-nodify
67+
working-directory: example
68+
run: |
69+
gem update cocoapods xcodeproj
70+
yarn rn-setup
71+
72+
- name: Install brew dependencies
73+
run: brew tap wix/brew && brew install applesimutils
74+
75+
- name: Build iOS app
76+
working-directory: example
77+
run: yarn e2e:ios-build
78+
79+
- name: Test iOS app
80+
working-directory: example
81+
run: yarn e2e:ios-test

.github/workflows/e2e-ios.yml

Lines changed: 41 additions & 22 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
12+
e2e-ios:
1113
runs-on: macos-12
1214
timeout-minutes: 120
1315

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

18-
- name: Set up Node.js
22+
- name: Node
1923
uses: actions/setup-node@v3
2024
with:
2125
node-version: 16
26+
cache: 'yarn' # cache packages, but not node_modules
27+
cache-dependency-path: 'exmpl/yarn.lock'
2228

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

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

4652
- name: Rebuild detox
47-
if: steps.app-npmcache.outputs.cache-hit == 'true'
48-
working-directory: example
53+
if: steps.cache-nm.outputs.cache-hit == 'true'
54+
working-directory: exmpl
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'
53-
working-directory: example
57+
- name: Install Dependencies
58+
if: steps.cache-nm.outputs.cache-hit != 'true'
59+
working-directory: exmpl
5460
run: yarn install
5561

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
66+
5667
- name: Cache Pods
5768
uses: actions/cache@v3
5869
id: podcache
5970
with:
60-
path: example/ios/Pods
71+
path: exmpl/ios/Pods
6172
key: pods-${{ hashFiles('**/Podfile.lock') }}
6273

63-
- name: Install pods and rn-nodify
64-
working-directory: example
74+
- name: Install pods
75+
working-directory: exmpl
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
73-
working-directory: example
74-
run: yarn e2e:ios-build
85+
- name: Build
86+
working-directory: exmpl
87+
run: yarn e2e:build:ios-release
7588

7689
- name: Test iOS app
77-
working-directory: example
78-
run: yarn e2e:ios-test
90+
working-directory: exmpl
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: ./exmpl/artifacts/

exmpl/.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

exmpl/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

exmpl/.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+
};

0 commit comments

Comments
 (0)