release: 6.5.0-beta.1 #5972
Workflow file for this run
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: Native Tests | |
on: | |
push: | |
branches: | |
- main | |
- v5 | |
- release/** | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
diff_check: | |
uses: ./.github/workflows/skip-ci.yml | |
test-ios: | |
name: ios | |
runs-on: macos-15 | |
needs: [diff_check] | |
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Enable Corepack | |
run: | | |
npm install -g corepack@0.29.4 | |
corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
- name: Install SDK JS Dependencies | |
run: yarn install | |
- name: Install App Pods | |
working-directory: packages/core/RNSentryCocoaTester | |
run: pod install | |
- name: Run iOS Tests | |
working-directory: packages/core/RNSentryCocoaTester | |
env: | |
SCHEME: RNSentryCocoaTester | |
CONFIGURATION: Release | |
DESTINATION: 'platform=iOS Simulator,OS=latest,name=iPhone 16' | |
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: packages/core/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@62dbb605bba737720e10b196cb4220d374026a6d #pin@v2.33.0 | |
with: | |
working-directory: packages/core/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 |