Skip to content

chore: creating preload docs #114

chore: creating preload docs

chore: creating preload docs #114

Workflow file for this run

name: PR checks
on:
workflow_dispatch:
pull_request:
jobs:
setup:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
node_modules
example/ios/Pods
example/ios/build
example/node_modules
key: ${{ runner.os }}-setup-cache-2
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn bootstrap
lint:
runs-on: macos-latest
needs: setup
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
node_modules
example/ios/Pods
example/ios/build
example/node_modules
key: ${{ runner.os }}-setup-cache-2
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn lint
- run: yarn typescript
test:
runs-on: macos-latest
needs: setup
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
node_modules
example/ios/Pods
example/ios/build
example/node_modules
key: ${{ runner.os }}-setup-cache-2
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn test
ios:
runs-on: macos-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
node_modules
example/ios/Pods
example/ios/build
example/node_modules
key: ${{ runner.os }}-setup-cache-2
- uses: actions/cache@v4
with:
path: |
example/ios/build
key: ${{ runner.os }}-ios-cache
- name: install detox deps
run: |
brew tap wix/brew
brew install applesimutils
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn e2e:reset
- run: yarn bootstrap
- run: yarn e2e:build:ios:release
- run: yarn e2e:test:ios:release
android:
runs-on: macos-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
node_modules
example/ios/Pods
example/ios/build
example/node_modules
key: ${{ runner.os }}-setup-cache-2
- uses: actions/cache@v4
with:
path: |
android/build
example/android/build
key: ${{ runner.os }}-android-cache
- name: get device name
id: device
run: node -e "console.log('AVD_NAME=' + require('./.detoxrc').devices.android.device.avdName)" >> $GITHUB_OUTPUT
- name: list possible devices
run: $ANDROID_HOME/tools/bin/avdmanager list
- name: create ${{ steps.device.outputs.AVD_NAME }}
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-31;default;x86_64"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name "${{ steps.device.outputs.AVD_NAME }}" --device "pixel_xl" -k 'system-images;android-31;default;x86_64'
$ANDROID_HOME/emulator/emulator -list-avds
- name: start android device
timeout-minutes: 10
continue-on-error: true
run: |
echo "starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd "${{ steps.device.outputs.AVD_NAME }}" -no-snapshot-save -no-window -no-boot-anim -camera-back none &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb devices
echo "emulator started"
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: gradle
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn add [email protected] -D
- run: yarn e2e:build:android:release
- run: yarn e2e:test:android:release