From 13d456fa3bc2def36ef8302e04188437e73d8f42 Mon Sep 17 00:00:00 2001 From: MrRefactor Date: Wed, 19 Jun 2024 21:04:09 +0800 Subject: [PATCH] Fix CI workflow issues --- .github/workflows/android.yml | 53 ++++++++--------------------------- .github/workflows/ios.yml | 13 ++------- 2 files changed, 14 insertions(+), 52 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 7b3031d9..0676b202 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -4,7 +4,6 @@ on: pull_request: branches: - master - - next paths: - '.github/workflows/android.yml' - 'android/**' @@ -12,15 +11,13 @@ on: push: branches: - master - - next - -concurrency: - group: ${{ github.ref }}-android - cancel-in-progress: true jobs: android-build: runs-on: macos-12 + concurrency: + group: ${{ github.ref }}-android + cancel-in-progress: true steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies @@ -48,23 +45,7 @@ jobs: with: distribution: 'zulu' java-version: '17' - - - name: Gradle cache - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} - - - name: AVD cache - uses: actions/cache@v4 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: avd-cache + cache: 'gradle' - name: Install Maestro CLI run: export MAESTRO_VERSION=1.31.0; curl -Ls "https://get.maestro.mobile.dev" | bash @@ -72,29 +53,17 @@ jobs: - name: Add Maestro to path run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH - - 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: 29 - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: false - cores: 2 - ram-size: 4096M - profile: Nexus 6 - script: echo "Generated AVD snapshot for caching." - - name: Run Android Emulator and app uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 29 - force-avd-creation: false - emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + api-level: 31 + target: aosp_atd + profile: pixel_2 + ram-size: '4096M' + disk-size: '10G' disable-animations: false - cores: 2 - ram-size: 4096M - profile: Nexus 6 + avd-name: e2e_emulator + arch: x86_64 script: | yarn run-example-android yarn test:e2e:android diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index c66015e3..361e5571 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -4,7 +4,6 @@ on: pull_request: branches: - master - - next paths: - '.github/workflows/ios.yml' - 'ios/**' @@ -12,24 +11,18 @@ on: push: branches: - master - - next -concurrency: - group: ${{ github.ref }}-ios - cancel-in-progress: true jobs: ios-build: runs-on: macos-14 + concurrency: + group: ${{ github.ref }}-ios + cancel-in-progress: true steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - - name: Use latest stable Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - name: Pull dependencies uses: actions/cache@v4 with: