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

Commit

Permalink
Convert repository to monorepo (#67)
Browse files Browse the repository at this point in the history
## 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)
  • Loading branch information
mironiasty authored Jun 27, 2024
1 parent dc6908c commit c9505fd
Show file tree
Hide file tree
Showing 207 changed files with 20,915 additions and 26,422 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// @generated by expo-module-scripts
module.exports = require('expo-module-scripts/eslintrc.base.js');
module.exports = require("expo-module-scripts/eslintrc.base.js");
42 changes: 21 additions & 21 deletions .github/actions/restore_apk_file/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ runs:
path: ${{ env.ANDROID_APP_PATH }}
key: |
APK-${{ hashFiles(
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/assets/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/components/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/contexts/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/hooks/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/navigators/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/providers/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/screens/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/types/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/utils/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/App.tsx',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/yarn.lock',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/assets/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/components/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/contexts/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/hooks/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/navigators/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/providers/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/screens/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/types/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/utils/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/App.tsx',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/yarn.lock',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/yarn.lock',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/app/src/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/app/build.gradle',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/app/debug.keystore',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/app/proguard-rules.pro',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradle/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/build.gradle',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradle.properties',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradlew',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradle.bat',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/settings.gradle'
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/app/src/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/app/build.gradle',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/app/debug.keystore',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/app/proguard-rules.pro',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/gradle/**/*',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/build.gradle',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/gradle.properties',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/gradlew',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/gradle.bat',
'/home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/video-chat/android/settings.gradle'
) }}
40 changes: 10 additions & 30 deletions .github/workflows/android_emulator_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
ANDROID_CMD: 'commandlinetools-linux-10406996_latest.zip'
ANDROID_APP_PATH:
${{ github.workspace
}}/example/android/app/build/outputs/apk/release/app-release.apk
}}/examples/video-chat/android/app/build/outputs/apk/release/app-release.apk

steps:
- name: Checkout
Expand All @@ -54,7 +54,7 @@ jobs:
FISHJAM_HOST_MOBILE=10.0.2.2:5002
ANDROID_DEVICE_NAME=$EMULATOR_DEVICE
ANDROID_APP_PATH=$ANDROID_APP_PATH
" > $GITHUB_WORKSPACE/example/webdriverio-test/.env
" > $GITHUB_WORKSPACE/examples/webdriverio-test/.env
- name: Enable KVM group perms
run: |
Expand Down Expand Up @@ -92,27 +92,10 @@ jobs:
name: yarn-lock
path: |
/home/runner/work/react-native-client-sdk/react-native-client-sdk/yarn.lock
- name: Run yarn install in example directory
- name: Run yarn build
run: |
cd $GITHUB_WORKSPACE/example
yarn install --frozen-lockfile
- name: Upload yarn.lock artifact
uses: actions/upload-artifact@v3
with:
name: yarn-lock-example
path: |
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/yarn.lock
- name: Run yarn install in webdriverio-test directory
run: |
cd $GITHUB_WORKSPACE/example/webdriverio-test
yarn install --frozen-lockfile
- name: Upload yarn.lock artifact
uses: actions/upload-artifact@v3
with:
name: yarn-lock-webdriverio-test
path: |
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/webdriverio-test/yarn.lock
cd $GITHUB_WORKSPACE
yarn build
- name: Install appium
run: npm i --location=global appium

Expand All @@ -126,10 +109,7 @@ jobs:
distribution: 'zulu'
cache: 'gradle'
cache-dependency-path: |
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/yarn.lock
/home/runner/work/react-native-client-sdk/react-native-client-sdk/yarn.lock
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/*.gradle*
/home/runner/work/react-native-client-sdk/react-native-client-sdk/example/android/gradle-wrapper.properties
- name: Setup Android SDK
uses: android-actions/setup-android@v3
Expand Down Expand Up @@ -173,7 +153,7 @@ jobs:
if: steps.restore-apk.outputs.cache-hit != 'true'
timeout-minutes: 20
run: |
cd $GITHUB_WORKSPACE/example/android
cd $GITHUB_WORKSPACE/examples/video-chat/android
./gradlew assembleRelease
- name: Cache new apk if necessary
Expand All @@ -182,12 +162,12 @@ jobs:

- name: Logs from app to file
run: |
cd $GITHUB_WORKSPACE/example/webdriverio-test
cd $GITHUB_WORKSPACE/examples/webdriverio-test
adb -e logcat "*:S" ReactNative:V ReactNativeJS:V > logs.txt &
- name: Run tests
run: |
cd $GITHUB_WORKSPACE/example/webdriverio-test
cd $GITHUB_WORKSPACE/examples/webdriverio-test
npx wdio wdio.conf.ts 2>&1 | tee appium.txt; test ${PIPESTATUS[0]} -eq 0
sleep 10
Expand All @@ -196,11 +176,11 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: appium.txt
path: /home/runner/work/react-native-client-sdk/react-native-client-sdk/example/webdriverio-test/appium.txt
path: /home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/webdriverio-test/appium.txt

- name: Upload logs from app
if: always()
uses: actions/upload-artifact@v4
with:
name: logs.txt
path: /home/runner/work/react-native-client-sdk/react-native-client-sdk/example/webdriverio-test/logs.txt
path: /home/runner/work/react-native-client-sdk/react-native-client-sdk/examples/webdriverio-test/logs.txt
20 changes: 3 additions & 17 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,11 @@ jobs:
cache: 'yarn'
- name: Install node dependencies
run: yarn
- name: Install dependencies for example
run: yarn
working-directory: ./example
- name: Install dependencies for example tests
run: yarn
working-directory: ./example/webdriverio-test
- name: Build Types
run: yarn build
- name: Check types
run: yarn typecheck
run: yarn tsc
- name: Lint
run: yarn lint:check
- name: Lint Example
run: yarn lint:check
working-directory: ./example
- name: Prettier
run: yarn format:check
- name: Prettier Example
run: yarn format:check
working-directory: ./example
- name: Build
run: EXPO_NONINTERACTIVE=true yarn build
- name: Build plugin
run: EXPO_NONINTERACTIVE=true yarn build plugin
1 change: 1 addition & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ jobs:
run: yarn
- name: Run unit tests for the library
run: yarn test -- src/__tests__/*.test.tsx
working-directory: ./packages/react-native-client
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# BUCK
buck-out/
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions .npmignore

This file was deleted.

8 changes: 0 additions & 8 deletions .release-it.json

This file was deleted.

Loading

0 comments on commit c9505fd

Please sign in to comment.