updated the workfolow for android #15
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: E2E Test React Native Gesture Handler | |
| on: | |
| pull_request: | |
| paths: | |
| - packages/react-native-gesture-handler/** | |
| push: | |
| branches: | |
| - main | |
| - "@relextm19/e2e" | |
| workflow_dispatch: | |
| concurrency: | |
| group: e2e-app-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ios-e2e: | |
| if: github.repository == 'software-mansion/react-native-gesture-handler' | |
| runs-on: macos-14 | |
| env: | |
| WORKING_DIRECTORY: apps/e2eApp | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: Use node 24 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: yarn | |
| - name: Use latest stable Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.1' | |
| - name: Install dependencies | |
| run: yarn --immutable | |
| - name: Cache Pods | |
| id: cache-pods | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.WORKING_DIRECTORY }}/ios/Pods | |
| key: ${{ runner.os }}-pods-${{ hashFiles(format('{0}/ios/Podfile.lock', env.WORKING_DIRECTORY)) }} | |
| - name: Install pods | |
| working-directory: ${{ env.WORKING_DIRECTORY }}/ios | |
| run: pod install | |
| - name : Setup Detox | |
| run: brew tap wix/brew && brew install applesimutils && npm install -g detox-cli | |
| - name: Cache Xcode DerivedData | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.WORKING_DIRECTORY }}/ios/build | |
| key: ${{ runner.os }}-xcode-build-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-xcode-build- | |
| - name: Build for iOS | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: detox build -c ios.sim.release | |
| - name: Run tests on iOS | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: yarn test:ios | |
| android-e2e: | |
| if: github.repository == 'software-mansion/react-native-gesture-handler' | |
| runs-on: macos-14 | |
| env: | |
| WORKING_DIRECTORY: apps/e2eApp | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - name: Use node 24 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn --immutable | |
| - name : Setup Detox | |
| run: npm install -g detox-cli | |
| - name: Cache Android build | |
| id: cache-android-build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.WORKING_DIRECTORY }}/android/app/build | |
| key: ${{ runner.os }}-android-build-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-android-build- | |
| - name: Build for Android | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: detox build -c android.emu.release | |
| - name: Run tests on Android Emulator | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 33 | |
| target: default | |
| arch: x86_64 | |
| avd-name: Pixel_9_Pro | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| script: yarn test:android |