chore: bump main examples & lib to use [email protected] (#2825)
#3034
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: Test Android e2e - old architecture | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/android-e2e-test.yml' | |
| - 'package.json' | |
| - 'android/**' | |
| - 'common/**' | |
| - 'Example/**' | |
| - 'src/**' | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| WORKING_DIRECTORY: Example | |
| API_LEVEL: 34 | |
| concurrency: | |
| group: android-e2e-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: true | |
| android: false | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'zulu' | |
| cache: 'gradle' | |
| - name: Setup Node.js (version from .nvmrc) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Install root node dependencies | |
| run: yarn install && yarn submodules | |
| - name: Install node dependencies | |
| id: install_deps | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| continue-on-error: true | |
| run: yarn install | |
| - if: steps.install_deps.outcome == 'failure' | |
| name: Reinstall node dependencies | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: yarn | |
| - name: Install AVD dependencies | |
| # libxkbfile1 is removed by "Free Disk Space (Ubuntu)" step first. Here we install it again | |
| # as it seems to be needed by the emulator. | |
| run: | | |
| sudo apt update | |
| sudo apt-get install -y libpulse0 libgl1 libxkbfile1 | |
| - name: Build app | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: yarn build-e2e-android | |
| - name: Enable KVM | |
| run: | | |
| 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: AVD cache | |
| uses: actions/cache@v4 | |
| id: avd-cache | |
| with: | |
| path: | | |
| ~/.android/avd/* | |
| ~/.android/adb* | |
| key: avd-${{ env.API_LEVEL }} | |
| - name: Create AVD and generate snapshot for caching | |
| if: steps.avd-cache.outputs.cache-hit != 'true' | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ env.API_LEVEL }} | |
| target: default | |
| profile: pixel_2 | |
| ram-size: '4096M' | |
| disk-size: '10G' | |
| disable-animations: false | |
| force-avd-creation: false | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| avd-name: e2e_emulator | |
| arch: x86_64 | |
| script: echo "Generated AVD snapshot for caching." | |
| - name: Run emulator and tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| api-level: ${{ env.API_LEVEL }} | |
| target: default | |
| profile: pixel_2 | |
| ram-size: '4096M' | |
| disk-size: '10G' | |
| disable-animations: false | |
| force-avd-creation: false | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| avd-name: e2e_emulator | |
| arch: x86_64 | |
| script: yarn test-e2e-android | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ failure() }} | |
| with: | |
| name: android-fail-screen-shots | |
| path: ${{ env.WORKING_DIRECTORY }}/artifacts |