|
4 | 4 | pull_request:
|
5 | 5 | branches:
|
6 | 6 | - master
|
7 |
| - - next |
8 | 7 | paths:
|
9 | 8 | - '.github/workflows/android.yml'
|
10 | 9 | - 'android/**'
|
11 | 10 | - 'example/android/**'
|
12 | 11 | push:
|
13 | 12 | branches:
|
14 | 13 | - master
|
15 |
| - - next |
16 |
| - |
17 |
| -concurrency: |
18 |
| - group: ${{ github.ref }}-android |
19 |
| - cancel-in-progress: true |
20 | 14 |
|
21 | 15 | jobs:
|
22 | 16 | android-build:
|
23 | 17 | runs-on: macos-12
|
| 18 | + concurrency: |
| 19 | + group: ${{ github.ref }}-android |
| 20 | + cancel-in-progress: true |
24 | 21 | steps:
|
25 | 22 | - uses: actions/checkout@v4
|
26 | 23 | - uses: ./.github/actions/install-dependencies
|
@@ -48,53 +45,25 @@ jobs:
|
48 | 45 | with:
|
49 | 46 | distribution: 'zulu'
|
50 | 47 | java-version: '17'
|
51 |
| - |
52 |
| - - name: Gradle cache |
53 |
| - uses: actions/cache@v4 |
54 |
| - with: |
55 |
| - path: | |
56 |
| - ~/.gradle/caches |
57 |
| - ~/.gradle/wrapper |
58 |
| - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} |
59 |
| - |
60 |
| - - name: AVD cache |
61 |
| - uses: actions/cache@v4 |
62 |
| - id: avd-cache |
63 |
| - with: |
64 |
| - path: | |
65 |
| - ~/.android/avd/* |
66 |
| - ~/.android/adb* |
67 |
| - key: avd-cache |
| 48 | + cache: 'gradle' |
68 | 49 |
|
69 | 50 | - name: Install Maestro CLI
|
70 | 51 | run: export MAESTRO_VERSION=1.31.0; curl -Ls "https://get.maestro.mobile.dev" | bash
|
71 | 52 |
|
72 | 53 | - name: Add Maestro to path
|
73 | 54 | run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
|
74 | 55 |
|
75 |
| - - name: create AVD and generate snapshot for caching |
76 |
| - if: steps.avd-cache.outputs.cache-hit != 'true' |
77 |
| - uses: reactivecircus/android-emulator-runner@v2 |
78 |
| - with: |
79 |
| - api-level: 29 |
80 |
| - force-avd-creation: false |
81 |
| - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none |
82 |
| - disable-animations: false |
83 |
| - cores: 2 |
84 |
| - ram-size: 4096M |
85 |
| - profile: Nexus 6 |
86 |
| - script: echo "Generated AVD snapshot for caching." |
87 |
| - |
88 | 56 | - name: Run Android Emulator and app
|
89 | 57 | uses: reactivecircus/android-emulator-runner@v2
|
90 | 58 | with:
|
91 |
| - api-level: 29 |
92 |
| - force-avd-creation: false |
93 |
| - emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none |
| 59 | + api-level: 31 |
| 60 | + target: aosp_atd |
| 61 | + profile: pixel_2 |
| 62 | + ram-size: '4096M' |
| 63 | + disk-size: '10G' |
94 | 64 | disable-animations: false
|
95 |
| - cores: 2 |
96 |
| - ram-size: 4096M |
97 |
| - profile: Nexus 6 |
| 65 | + avd-name: e2e_emulator |
| 66 | + arch: x86_64 |
98 | 67 | script: |
|
99 | 68 | yarn run-example-android
|
100 | 69 | yarn test:e2e:android
|
|
0 commit comments