chore: bump the rncli group across 1 directory with 3 updates #1122
This file contains hidden or 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: Harness Android | |
| concurrency: | |
| group: harness-android-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref_name != 'main' }} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| device_api_level: | |
| description: "Android API level for the emulator" | |
| required: false | |
| default: "36" | |
| type: string | |
| device_profile: | |
| description: "Device profile" | |
| required: false | |
| default: "pixel_7" | |
| type: string | |
| avd_name: | |
| description: "AVD name" | |
| required: false | |
| default: "Pixel_7_API_36" | |
| type: string | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/harness-android.yml" | |
| - "apps/example/android/**" | |
| - "**/nitrogen/generated/shared/**" | |
| - "**/nitrogen/generated/android/**" | |
| - "packages/react-native-nitro-test/cpp/**" | |
| - "packages/react-native-nitro-test/android/**" | |
| - "packages/react-native-nitro-test-external/cpp/**" | |
| - "packages/react-native-nitro-test-external/android/**" | |
| - "packages/react-native-nitro-modules/cpp/**" | |
| - "packages/react-native-nitro-modules/android/**" | |
| - "packages/react-native-nitro-modules/src/**" | |
| - "**/bun.lock" | |
| - "**/react-native.config.js" | |
| - "**/nitro.json" | |
| - "apps/example/__tests__/**" | |
| - "apps/example/src/getTests.ts" | |
| - "apps/example/src/testing/**" | |
| - "apps/example/jest.harness.config.mjs" | |
| - "apps/example/package.json" | |
| - "apps/example/rn-harness.config.mjs" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/harness-android.yml" | |
| - "apps/example/android/**" | |
| - "**/nitrogen/generated/shared/**" | |
| - "**/nitrogen/generated/android/**" | |
| - "packages/react-native-nitro-test/cpp/**" | |
| - "packages/react-native-nitro-test/android/**" | |
| - "packages/react-native-nitro-test-external/cpp/**" | |
| - "packages/react-native-nitro-test-external/android/**" | |
| - "packages/react-native-nitro-modules/cpp/**" | |
| - "packages/react-native-nitro-modules/android/**" | |
| - "packages/react-native-nitro-modules/src/**" | |
| - "**/bun.lock" | |
| - "**/react-native.config.js" | |
| - "**/nitro.json" | |
| - "apps/example/__tests__/**" | |
| - "apps/example/src/getTests.ts" | |
| - "apps/example/src/testing/**" | |
| - "apps/example/jest.harness.config.mjs" | |
| - "apps/example/package.json" | |
| - "apps/example/rn-harness.config.mjs" | |
| env: | |
| # Device configuration - can be overridden by workflow_dispatch inputs | |
| DEVICE_API_LEVEL: ${{ github.event.inputs.device_api_level || '36' }} | |
| DEVICE_ARCH: x86_64 | |
| DEVICE_PROFILE: ${{ github.event.inputs.device_profile || 'pixel_7' }} | |
| AVD_NAME: ${{ github.event.inputs.avd_name || 'Pixel_7_API_36' }} | |
| AVD_DISK_SIZE: 1G | |
| AVD_HEAP_SIZE: 1G | |
| jobs: | |
| harness_android_new: | |
| name: Harness Android (${{ matrix.sanitizer.name }}, new architecture) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| min-sdk: | |
| - '26' | |
| sanitizer: | |
| - name: Default | |
| gradle_property: "" | |
| - name: ASan | |
| gradle_property: "address" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| - name: Reclaim disk space | |
| uses: AdityaGarg8/remove-unwanted-software@v5 | |
| with: | |
| remove-dotnet: true | |
| remove-haskell: true | |
| remove-codeql: true | |
| remove-docker-images: true | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install npm dependencies (bun) | |
| run: bun install | |
| - name: Set minSdk in build.gradle | |
| run: sed -i "s/minSdkVersion = 24/minSdkVersion = ${{ matrix.min-sdk }}/g" apps/example/android/build.gradle | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v5.7.0 | |
| with: | |
| distribution: "zulu" | |
| java-version: 17 | |
| java-package: jdk | |
| - name: Restore Gradle/CMake cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| apps/example/android/.gradle | |
| apps/example/android/app/.cxx | |
| key: ${{ runner.os }}-gradle-${{ matrix.min-sdk }}-${{ env.DEVICE_ARCH }}-${{ matrix.sanitizer.name }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/CMakeLists.txt', '**/*.cmake') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle-${{ matrix.min-sdk }}-${{ env.DEVICE_ARCH }}-${{ matrix.sanitizer.name }}- | |
| ${{ runner.os }}-gradle- | |
| - name: Build Android app | |
| working-directory: apps/example/android | |
| run: ./gradlew :app:assembleDebug --no-daemon --build-cache -PreactNativeArchitectures=${{ env.DEVICE_ARCH }} -PnitroSanitizer=${{ matrix.sanitizer.gradle_property }} | |
| - name: Run Harness E2E tests | |
| uses: callstackincubator/react-native-harness@v1.4.1 | |
| with: | |
| runner: android | |
| projectRoot: apps/example | |
| app: android/app/build/outputs/apk/debug/app-debug.apk | |
| packageManager: bun | |
| # Gradle cache doesn't like daemons | |
| - name: Stop Gradle Daemon | |
| working-directory: apps/example/android | |
| run: ./gradlew --stop |