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

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mironiasty committed Jun 11, 2024
1 parent ba06057 commit fbdd157
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 51 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/android_emulator_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -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
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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 fbdd157

Please sign in to comment.