8
8
- ' .github/workflows/android.yml'
9
9
- ' android/**'
10
10
- ' example/android/**'
11
- - ' fabricexample/android/**'
12
11
push :
13
12
branches :
14
13
- master
15
14
16
-
17
- concurrency :
15
+ concurrency :
18
16
group : ${{ github.ref }}-android
19
17
cancel-in-progress : true
20
18
21
19
jobs :
22
20
android-build :
23
- runs-on : ubuntu -latest
21
+ runs-on : macos -latest
24
22
steps :
25
23
- uses : actions/checkout@v3
26
24
- uses : ./.github/actions/install-dependencies
@@ -42,51 +40,36 @@ jobs:
42
40
43
41
- name : Install required example dependencies on yarn.lock change
44
42
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
47
44
48
45
- uses : actions/setup-java@v3
49
46
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'
63
49
64
- - name : Pull dependencies
50
+ - name : Gradle cache
65
51
uses : actions/cache@v3
66
52
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') }}
69
57
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
84
60
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
89
63
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