Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit c9505fd

Browse files
authored
Convert repository to monorepo (#67)
## Description Convert mobile SDK into monorepo. This change is mostly moving files around to new project structure. And updating `yarn` to latest version. ## Motivation and Context This solves various issues with current setup, and in future will allow to merge all native SDKs into single repository ## How has this been tested? There should be no changes in SDK code, only changes in file structure. So assuming apps is still building, everything should work as before ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist: - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. ## Screenshots (if appropriate)
1 parent dc6908c commit c9505fd

File tree

207 files changed

+20915
-26422
lines changed

Some content is hidden

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

207 files changed

+20915
-26422
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// @generated by expo-module-scripts
2-
module.exports = require('expo-module-scripts/eslintrc.base.js');
2+
module.exports = require("expo-module-scripts/eslintrc.base.js");

.github/actions/restore_apk_file/action.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ runs:
1818
path: ${{ env.ANDROID_APP_PATH }}
1919
key: |
2020
APK-${{ hashFiles(
21-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/assets/**/*',
22-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/components/**/*',
23-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/contexts/**/*',
24-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/hooks/**/*',
25-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/navigators/**/*',
26-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/providers/**/*',
27-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/screens/**/*',
28-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/types/**/*',
29-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/utils/**/*',
30-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/App.tsx',
31-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/yarn.lock',
21+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/assets/**/*',
22+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/components/**/*',
23+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/contexts/**/*',
24+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/hooks/**/*',
25+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/navigators/**/*',
26+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/providers/**/*',
27+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/screens/**/*',
28+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/types/**/*',
29+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/utils/**/*',
30+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/App.tsx',
31+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/yarn.lock',
3232
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/yarn.lock',
33-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/app/src/**/*',
34-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/app/build.gradle',
35-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/app/debug.keystore',
36-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/app/proguard-rules.pro',
37-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradle/**/*',
38-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/build.gradle',
39-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradle.properties',
40-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradlew',
41-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradle.bat',
42-
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/settings.gradle'
33+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/app/src/**/*',
34+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/app/build.gradle',
35+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/app/debug.keystore',
36+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/app/proguard-rules.pro',
37+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/gradle/**/*',
38+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/build.gradle',
39+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/gradle.properties',
40+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/gradlew',
41+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/gradle.bat',
42+
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/settings.gradle'
4343
) }}

.github/workflows/android_emulator_e2e.yaml

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
ANDROID_CMD: 'commandlinetools-linux-10406996_latest.zip'
4242
ANDROID_APP_PATH:
4343
${{ github.workspace
44-
}}/example/android/app/build/outputs/apk/release/app-release.apk
44+
}}/examples/video-chat/android/app/build/outputs/apk/release/app-release.apk
4545

4646
steps:
4747
- name: Checkout
@@ -54,7 +54,7 @@ jobs:
5454
FISHJAM_HOST_MOBILE=10.0.2.2:5002
5555
ANDROID_DEVICE_NAME=$EMULATOR_DEVICE
5656
ANDROID_APP_PATH=$ANDROID_APP_PATH
57-
" > $GITHUB_WORKSPACE/example/webdriverio-test/.env
57+
" > $GITHUB_WORKSPACE/examples/webdriverio-test/.env
5858
5959
- name: Enable KVM group perms
6060
run: |
@@ -92,27 +92,10 @@ jobs:
9292
name: yarn-lock
9393
path: |
9494
/home/runner/work/react-native-client-sdk/react-native-client-sdk/yarn.lock
95-
- name: Run yarn install in example directory
95+
- name: Run yarn build
9696
run: |
97-
cd $GITHUB_WORKSPACE/example
98-
yarn install --frozen-lockfile
99-
- name: Upload yarn.lock artifact
100-
uses: actions/upload-artifact@v3
101-
with:
102-
name: yarn-lock-example
103-
path: |
104-
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/yarn.lock
105-
- name: Run yarn install in webdriverio-test directory
106-
run: |
107-
cd $GITHUB_WORKSPACE/example/webdriverio-test
108-
yarn install --frozen-lockfile
109-
- name: Upload yarn.lock artifact
110-
uses: actions/upload-artifact@v3
111-
with:
112-
name: yarn-lock-webdriverio-test
113-
path: |
114-
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/webdriverio-test/yarn.lock
115-
97+
cd $GITHUB_WORKSPACE
98+
yarn build
11699
- name: Install appium
117100
run: npm i --location=global appium
118101

@@ -126,10 +109,7 @@ jobs:
126109
distribution: 'zulu'
127110
cache: 'gradle'
128111
cache-dependency-path: |
129-
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/yarn.lock
130112
/home/runner/work/react-native-client-sdk/react-native-client-sdk/yarn.lock
131-
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/*.gradle*
132-
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradle-wrapper.properties
133113
134114
- name: Setup Android SDK
135115
uses: android-actions/setup-android@v3
@@ -173,7 +153,7 @@ jobs:
173153
if: steps.restore-apk.outputs.cache-hit != 'true'
174154
timeout-minutes: 20
175155
run: |
176-
cd $GITHUB_WORKSPACE/example/android
156+
cd $GITHUB_WORKSPACE/examples/video-chat/android
177157
./gradlew assembleRelease
178158
179159
- name: Cache new apk if necessary
@@ -182,12 +162,12 @@ jobs:
182162

183163
- name: Logs from app to file
184164
run: |
185-
cd $GITHUB_WORKSPACE/example/webdriverio-test
165+
cd $GITHUB_WORKSPACE/examples/webdriverio-test
186166
adb -e logcat "*:S" ReactNative:V ReactNativeJS:V > logs.txt &
187167
188168
- name: Run tests
189169
run: |
190-
cd $GITHUB_WORKSPACE/example/webdriverio-test
170+
cd $GITHUB_WORKSPACE/examples/webdriverio-test
191171
npx wdio wdio.conf.ts 2>&1 | tee appium.txt; test ${PIPESTATUS[0]} -eq 0
192172
sleep 10
193173
@@ -196,11 +176,11 @@ jobs:
196176
uses: actions/upload-artifact@v4
197177
with:
198178
name: appium.txt
199-
path: /home/runner/work/react-native-client-sdk/react-native-client-sdk/example/webdriverio-test/appium.txt
179+
path: /home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/webdriverio-test/appium.txt
200180

201181
- name: Upload logs from app
202182
if: always()
203183
uses: actions/upload-artifact@v4
204184
with:
205185
name: logs.txt
206-
path: /home/runner/work/react-native-client-sdk/react-native-client-sdk/example/webdriverio-test/logs.txt
186+
path: /home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/webdriverio-test/logs.txt

.github/workflows/lint.yaml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,11 @@ jobs:
1414
cache: 'yarn'
1515
- name: Install node dependencies
1616
run: yarn
17-
- name: Install dependencies for example
18-
run: yarn
19-
working-directory: ./example
20-
- name: Install dependencies for example tests
21-
run: yarn
22-
working-directory: ./example/webdriverio-test
17+
- name: Build Types
18+
run: yarn build
2319
- name: Check types
24-
run: yarn typecheck
20+
run: yarn tsc
2521
- name: Lint
2622
run: yarn lint:check
27-
- name: Lint Example
28-
run: yarn lint:check
29-
working-directory: ./example
3023
- name: Prettier
3124
run: yarn format:check
32-
- name: Prettier Example
33-
run: yarn format:check
34-
working-directory: ./example
35-
- name: Build
36-
run: EXPO_NONINTERACTIVE=true yarn build
37-
- name: Build plugin
38-
run: EXPO_NONINTERACTIVE=true yarn build plugin

.github/workflows/unit_tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ jobs:
1616
run: yarn
1717
- name: Run unit tests for the library
1818
run: yarn test -- src/__tests__/*.test.tsx
19+
working-directory: ./packages/react-native-client

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ node_modules/
5151
npm-debug.log
5252
yarn-debug.log
5353
yarn-error.log
54+
.yarn/*
55+
!.yarn/cache
56+
!.yarn/patches
57+
!.yarn/plugins
58+
!.yarn/releases
59+
!.yarn/sdks
60+
!.yarn/versions
5461

5562
# BUCK
5663
buck-out/
File renamed without changes.

.npmignore

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

.release-it.json

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

0 commit comments

Comments
 (0)