-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.47 KB
/
android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
name: Integration test (Android)
jobs:
build:
# See: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
strategy:
matrix:
api-level: [ 29 ]
runs-on: macos-13
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: subosito/[email protected]
with:
channel: stable
- name: Flutter doctor
run: flutter doctor -v
- name: Flutter pub get
run: flutter pub get && flutter pub get -C generator
- name: Flutter analyze
run: flutter analyze
# See: https://github.com/ReactiveCircus/android-emulator-runner
- name: Gradle cache
uses: gradle/[email protected]
# - name: Flutter build
# run: cd example && flutter build appbundle --release --obfuscate --split-debug-info=symbols
# See: https://github.com/ReactiveCircus/android-emulator-runner
- name: Android simulator cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}
# See: https://github.com/ReactiveCircus/android-emulator-runner
- name: Android simulator cache initialisation
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: echo "Generated AVD snapshot for caching."
# See: https://github.com/ReactiveCircus/android-emulator-runner
- name: Flutter integration test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: cd example && flutter test && flutter test integration_test
# - uses: actions/upload-artifact@v3
# with:
# name: artifacts-android
# path: |
# ${{ github.workspace }}/example/symbols
# ${{ github.workspace }}/example/build/app/outputs/bundle/release