Skip to content

Fix: Implement fallback system to screens that aren't reporting on the native layer the time to display. #4822

Fix: Implement fallback system to screens that aren't reporting on the native layer the time to display.

Fix: Implement fallback system to screens that aren't reporting on the native layer the time to display. #4822

Workflow file for this run

name: Native Tests
on:
push:
branches: [main]
pull_request:
jobs:
diff_check:
uses: ./.github/workflows/skip-ci.yml
cancel-previous-workflow:
runs-on: ubuntu-latest
needs: [diff_check]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # [email protected]
with:
access_token: ${{ github.token }}
test-ios:
name: ios
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
needs: [diff_check]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
steps:
- uses: actions/checkout@v4
- name: NPM cache
uses: actions/cache@v4
id: deps-cache
with:
path: node_modules
key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock') }}
- name: Install SDK JS Dependencies
if: steps.deps-cache.outputs['cache-hit'] != 'true'
run: yarn install
- name: Install App Pods
working-directory: RNSentryCocoaTester
run: pod install
- name: Run iOS Tests
working-directory: RNSentryCocoaTester
env:
SCHEME: RNSentryCocoaTester
CONFIGURATION: Release
DESTINATION: 'platform=iOS Simulator,OS=latest,name=iPhone 14'
run: |
env NSUnbufferedIO=YES \
xcodebuild -workspace *.xcworkspace \
-scheme $SCHEME -configuration $CONFIGURATION \
-destination "$DESTINATION" \
test
test-android:
name: android
runs-on: ubuntu-latest
needs: [diff_check]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/disk-cleanup
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Gradle cache
uses: gradle/gradle-build-action@v3
- name: Run unit tests
working-directory: RNSentryAndroidTester
run: ./gradlew testDebugUnitTest
- name: Setup KVM
shell: bash
run: |
# check if virtualization is supported...
sudo apt install -y --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok
# allow access to KVM to run the emulator
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: Run connected tests
uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 #[email protected]
with:
working-directory: RNSentryAndroidTester
api-level: 30
force-avd-creation: false
disable-animations: true
disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
emulator-options: >
-no-window
-no-snapshot-save
-gpu swiftshader_indirect
-noaudio
-no-boot-anim
-camera-back none
-camera-front none
-timezone US/Pacific
script: |
./gradlew uninstallDebug uninstallDebugAndroidTest
./gradlew connectedCheck