Skip to content

Commit

Permalink
Fix CI workflow issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactor committed Jun 19, 2024
1 parent 494eab8 commit 13d456f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 52 deletions.
53 changes: 11 additions & 42 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,20 @@ on:
pull_request:
branches:
- master
- next
paths:
- '.github/workflows/android.yml'
- 'android/**'
- 'example/android/**'
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
Expand Down Expand Up @@ -48,53 +45,25 @@ 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

- 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
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,25 @@ on:
pull_request:
branches:
- master
- next
paths:
- '.github/workflows/ios.yml'
- 'ios/**'
- 'example/ios/**'
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:
Expand Down

0 comments on commit 13d456f

Please sign in to comment.