Skip to content

Merge branch 'release/8.17.1' #16078

Merge branch 'release/8.17.1'

Merge branch 'release/8.17.1' #16078

Workflow file for this run

name: Native Tests
on:
push:
branches:
- main
- release/**
pull_request:
types: [opened, synchronize, reopened, labeled]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
ready-to-merge-gate:
name: Ready-to-merge gate
uses: ./.github/workflows/ready-to-merge-workflow.yml
with:
is-pr: ${{ github.event_name == 'pull_request' }}
labels: ${{ toJson(github.event.pull_request.labels) }}
diff_check:
needs: [ready-to-merge-gate]
uses: ./.github/workflows/skip-ci.yml
detect-changes:
needs: [ready-to-merge-gate]
uses: ./.github/workflows/detect-changes.yml
with:
caller_event_name: ${{ github.event_name }}
caller_ref: ${{ github.ref }}
test-ios:
name: ios on ${{matrix.runner_provider}}
runs-on: ${{ matrix.runner_provider == 'bitrise' && fromJSON('["bitrise_pool_name:tahoe"]') || fromJSON('["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"]') }}
continue-on-error: ${{ matrix.runner_provider == 'bitrise' }}
needs: [diff_check, detect-changes]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' && needs.detect-changes.outputs.needs_ios == 'true' }}
strategy:
fail-fast: false
matrix:
runner_provider: ["cirrus", "bitrise"]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
package-manager-cache: false
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Setup asdf Node.js (Bitrise)
if: matrix.runner_provider == 'bitrise'
run: |
asdf global nodejs system
corepack enable
- name: Install SDK JS Dependencies
run: yarn install
- uses: actions/cache@v6
name: Cache Ruby
if: matrix.runner_provider != 'bitrise'
with:
path: |
~/.rbenv/versions
~/.rbenv/cache
key: ruby-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.ruby-version') }}
- uses: actions/cache@v6
name: Cache Ruby (Bitrise)
if: matrix.runner_provider == 'bitrise'
with:
path: ~/.asdf/installs/ruby
key: asdf-ruby-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.ruby-version') }}
- name: Install Ruby (Bitrise)
if: matrix.runner_provider == 'bitrise'
run: |
asdf install ruby 3.3.0
asdf local ruby 3.3.0
- uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
if: matrix.runner_provider != 'bitrise'
with:
ruby-version: "3.3.0"
env:
# Disable rbenv to avoid .ruby-version conflicts
RBENV_VERSION: system
- name: Install CocoaPods
run: gem install cocoapods
- name: Install App Pods
working-directory: packages/core/RNSentryCocoaTester
run: pod install
- name: List Available Simulators
run: xcrun simctl list devices available iPhone
- name: Run iOS Tests
working-directory: packages/core/RNSentryCocoaTester
env:
SCHEME: RNSentryCocoaTester
CONFIGURATION: Release
# Fix for Xcode 26+ with MetalToolchain: use default Xcode toolchain to avoid
# missing Swift compatibility libraries (swiftCompatibility56, etc.)
# See: https://github.com/actions/runner-images/issues/13135
TOOLCHAINS: com.apple.dt.toolchain.XcodeDefault
run: |
# Find first available iPhone simulator from latest iOS runtime
DEVICE_ID=$(xcrun simctl list devices available iPhone -j | jq -r '
.devices |
to_entries |
map(select(.key | startswith("com.apple.CoreSimulator.SimRuntime.iOS-"))) |
sort_by(.key) |
reverse |
.[0].value[] |
select(.isAvailable == true) |
.udid
' | head -1)
if [ -z "$DEVICE_ID" ]; then
echo "No iPhone simulators available"
exit 1
fi
echo "Using simulator: $DEVICE_ID"
env NSUnbufferedIO=YES \
xcodebuild -workspace *.xcworkspace \
-scheme $SCHEME -configuration $CONFIGURATION \
-destination "id=$DEVICE_ID" \
-quiet \
test
test-android:
name: android
runs-on:
["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"]
needs: [diff_check, detect-changes]
if: ${{ needs.diff_check.outputs.skip_ci != 'true' && needs.detect-changes.outputs.needs_android == 'true' }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/disk-cleanup
- uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5
with:
java-version: "17"
distribution: "adopt"
- name: Gradle cache
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
- 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@e89f39f1abbbd05b1113a29cf4db69e7540cae5a #pin@v2.37.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