chore(deps-dev): bump react-native-builder-bob from 0.30.2 to 0.30.3 … #903
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Lint files | |
run: yarn lint | |
- name: Typecheck files | |
run: yarn typecheck | |
test-e2e-android: | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Enable KVM | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Setup JDK for Build | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Cache Detox Build | |
uses: actions/cache@v3 | |
id: detox-build-cache | |
with: | |
path: example/android/app/build | |
key: detox-build-${{ runner.os }} | |
- name: Run Detox Build | |
run: yarn example detox build e2e --configuration android.emu.release | |
- name: Get Device Name | |
id: device | |
run: node -e "console.log('AVD_NAME=' + require('./example/.detoxrc').devices.emulator.device.avdName)" >> $GITHUB_OUTPUT | |
- name: AVD cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-34-x86_64-${{ steps.device.outputs.AVD_NAME }} | |
- name: Create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 34 | |
arch: x86_64 | |
avd-name: ${{ steps.device.outputs.AVD_NAME }} | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: echo "Generated AVD snapshot for caching." | |
- name: Run Detox Test(s) | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 34 | |
arch: x86_64 | |
avd-name: ${{ steps.device.outputs.AVD_NAME }} | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: yarn example detox test e2e --configuration android.emu.release --headless --record-logs all --take-screenshots failing | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: detox-artifacts | |
path: example/artifacts | |
test-e2e-ios: | |
runs-on: macos-latest | |
timeout-minutes: 45 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Install Detox Dependencies | |
run: | | |
brew tap wix/brew | |
brew install applesimutils | |
- name: Cache Pods | |
uses: actions/cache@v3 | |
id: pod-cache | |
with: | |
path: example/ios/Pods | |
key: pods-${{ hashFiles('**/Podfile.lock') }} | |
- name: Update Pods | |
run: | | |
gem update cocoapods xcodeproj | |
cd example/ios && NO_FLIPPER=1 pod install && cd ../.. | |
- name: Run Detox Rebuild Framework Cache | |
run: yarn example detox rebuild-framework-cache | |
- name: Cache Detox Build | |
uses: actions/cache@v3 | |
id: detox-build-cache | |
with: | |
path: example/ios/build | |
key: detox-build-${{ runner.os }} | |
- name: Run Detox Build | |
run: yarn example detox build e2e --configuration ios.sim.release | |
- name: Run Detox Test(s) | |
run: yarn example detox test e2e --configuration ios.sim.release --cleanup --headless --record-logs all --take-screenshots failing | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: detox-artifacts | |
path: example/artifacts | |
build-library: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Build package | |
run: yarn prepare |