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

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update scripts
Browse files Browse the repository at this point in the history
mironiasty committed Jun 11, 2024

Verified

This commit was signed with the committer’s verified signature.
mironiasty Miron Pawlik
1 parent ba06057 commit 33fdebf
Showing 6 changed files with 16 additions and 33 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/android_emulator_e2e.yaml
Original file line number Diff line number Diff line change
@@ -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: |
@@ -104,14 +104,14 @@ jobs:
/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
cd $GITHUB_WORKSPACE/examples/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
/home/runner/work/react-native-client-sdk/react-native-client-sdk/yarn.lock
- name: Install appium
run: npm i --location=global appium
@@ -126,10 +126,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
@@ -182,12 +179,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
@@ -196,11 +193,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
18 changes: 1 addition & 17 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -14,25 +14,9 @@ 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: 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
@@ -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
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -21,6 +21,8 @@
"build": "yarn workspace @fishjam-dev/react-native-client run tsc",
"tsc": "yarn workspaces foreach -A -p run tsc",
"format": "yarn workspaces foreach -A -p run format",
"lint": "yarn workspaces foreach -A -p run lint"
"format:check": "yarn workspaces foreach -A -p run format:check",
"lint": "yarn workspaces foreach -A -p run lint",
"lint:check": "yarn workspaces foreach -A -p run lint:check"
}
}
}
1 change: 1 addition & 0 deletions scripts/init.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
brew install swift-format
yarn
yarn build
chmod +x .githooks/*
cp .githooks/* .git/hooks
6 changes: 2 additions & 4 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@

# Run the commands in sequence
yarn
cd example
yarn
cd ios
pod install
yarn build

echo "All commands executed successfully!"

0 comments on commit 33fdebf

Please sign in to comment.