88 - ' .github/workflows/android.yml'
99 - ' android/**'
1010 - ' example/android/**'
11- - ' fabricexample/android/**'
1211 push :
1312 branches :
1413 - master
1514
16-
17- concurrency :
15+ concurrency :
1816 group : ${{ github.ref }}-android
1917 cancel-in-progress : true
2018
2119jobs :
2220 android-build :
23- runs-on : ubuntu -latest
21+ runs-on : macos -latest
2422 steps :
2523 - uses : actions/checkout@v3
2624 - uses : ./.github/actions/install-dependencies
@@ -42,51 +40,36 @@ jobs:
4240
4341 - name : Install required example dependencies on yarn.lock change
4442 if : steps.cache-example-npm.outputs.cache-hit != 'true'
45- run : yarn install --frozen-lockfile
46- working-directory : example
43+ run : yarn bootstrap-no-pods --frozen-lockfile
4744
4845 - uses : actions/setup-java@v3
4946 with :
50- distribution : " zulu"
51- java-version : " 11"
52-
53- - name : Build Android
54- run : ./gradlew assembleDebug
55- working-directory : example/android
56-
57- android-build-fabric :
58- runs-on : ubuntu-latest
59- needs : android-build
60- steps :
61- - uses : actions/checkout@v3
62- - uses : ./.github/actions/install-dependencies
47+ distribution : ' zulu'
48+ java-version : ' 11'
6349
64- - name : Pull dependencies
50+ - name : Gradle cache
6551 uses : actions/cache@v3
6652 with :
67- path : ./node_modules
68- key : ${{ hashFiles('./package.json') }}
53+ path : |
54+ ~/.gradle/caches
55+ ~/.gradle/wrapper
56+ key : gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
6957
70- - name : Cache fabric example node modules
71- id : cache-fabricexample-npm
72- uses : actions/cache@v3
73- env :
74- cache-name : cached-fabric-npm-deps
75- with :
76- path : fabricexample/node_modules
77- key : ${{ hashFiles('./fabricexample/yarn.lock') }}-${{ hashFiles('./yarn.lock') }}
78-
79- - name : Install required fabric example dependencies on yarn.lock change
80- if : steps.cache-fabricexample-npm.outputs.cache-hit != 'true'
81- shell : bash
82- run : yarn install --frozen-lockfile
83- working-directory : fabricexample
58+ - name : Install Maestro CLI
59+ run : export MAESTRO_VERSION=1.21.3; curl -Ls "https://get.maestro.mobile.dev" | bash
8460
85- - uses : actions/setup-java@v3
86- with :
87- distribution : " zulu"
88- java-version : " 11"
61+ - name : Add Maestro to path
62+ run : echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
8963
90- - name : Build Android (Fabric)
91- run : ./gradlew assembleDebug -PreactNativeArchitectures=arm64-v8a
92- working-directory : fabricexample/android
64+ - name : Run Android Emulator and app
65+ uses : reactivecircus/android-emulator-runner@v2
66+ with :
67+ api-level : 29
68+ arch : x86_64
69+ target : google_apis
70+ force-avd-creation : false
71+ emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
72+ disable-animations : true
73+ script : |
74+ yarn run-example-android
75+ yarn test:e2e:android
0 commit comments