Skip to content

Fix JS running during presented UI on new arch Android #744

Fix JS running during presented UI on new arch Android

Fix JS running during presented UI on new arch Android #744

Workflow file for this run

name: Unit Tests
on:
push:
branches: [master]
pull_request:
branches: ['**']
jobs:
test-ios:
name: unit-test-ios
runs-on: macos-15
steps:
- name: checkout
uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v4
with:
path: example/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: yarn bootstrap
- name: Run tests
run: yarn test:unit:ios
test-android:
name: unit-test-android
runs-on: ubuntu-24.04
steps:
# Enable KVM to be able to use hardware accelerated emulators.
# https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- name: Enable KVM group perms
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
ls /dev/kvm
- name: checkout
uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: yarn bootstrap-no-pods
- name: Setup Java environment
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
- name: Check code formatting
run: yarn format:android:check
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 33
arch: x86_64
profile: Galaxy Nexus
target: google_apis
force-avd-creation: false
disable-animations: true
cores: 3
ram-size: 8192M
script: |
yarn test:unit:android