forked from MaikuB/flutter_local_notifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
128 lines (123 loc) · 3.56 KB
/
.cirrus.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
task:
name: Build Android example app
container:
image: cirrusci/flutter:stable
pub_cache:
folder: ~/.pub-cache
install_melos_script:
- dart pub global activate melos
build_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- melos bootstrap
- melos run build:example_android
task:
name: Build iOS example app
osx_instance:
image: monterey-xcode
pub_cache:
folder: ~/.pub-cache
upgrade_script:
- flutter channel stable
- flutter upgrade
install_melos_script:
- dart pub global activate melos
build_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- melos bootstrap
- melos run build:example_ios
task:
name: Build macOS example app
osx_instance:
image: monterey-xcode
pub_cache:
folder: ~/.pub-cache
upgrade_script:
- flutter channel stable
- flutter upgrade
setup_script:
- flutter config --enable-macos-desktop
install_melos_script:
- dart pub global activate melos
build_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- melos bootstrap
- melos run build:example_macos
task:
name: Build Linux example app
container:
image: cirrusci/flutter:stable
pub_cache:
folder: ~/.pub-cache
setup_script:
- apt update
- apt install cmake ninja-build clang pkg-config libgtk-3-dev -y
- flutter config --enable-linux-desktop
install_melos_script:
- dart pub global activate melos
build_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- melos bootstrap
- melos run build:example_linux
task:
name: Run all unit tests (Dart)
container:
image: cirrusci/flutter:stable
install_melos_script:
- dart pub global activate melos
test_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- melos bootstrap
- melos run test:unit --no-select
task:
name: Run integration tests (Android)
env:
EMULATOR_API_LEVEL: 28
ANDROID_ABI: "default;x86"
container:
image: cirrusci/flutter:stable
cpu: 4
memory: 10G
kvm: true
pub_cache:
folder: ~/.pub-cache
install_melos_script:
- dart pub global activate melos
install_images_script: sdkmanager "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI"
create_device_script:
echo no | avdmanager create avd --force -n test -k "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI"
start_emulator_background_script:
$ANDROID_HOME/emulator/emulator -no-window -verbose -avd test -no-audio -no-window
wait_for_emulator_script:
android-wait-for-emulator
test_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- flutter precache
- melos bootstrap
- melos run build:example_android
- melos run test:integration
task:
name: Run integration tests (iOS)
osx_instance:
image: monterey-xcode
pub_cache:
folder: ~/.pub-cache
simulator_script:
- xcrun simctl list devicetypes
- xcrun simctl list runtimes
# create simulator
- udid=$(xcrun simctl create "iPhone 13" com.apple.CoreSimulator.SimDeviceType.iPhone-13 com.apple.CoreSimulator.SimRuntime.iOS-15-2)
# boot simulator
- xcrun simctl boot $udid
# enable notifications permissions via AppleSimulatorUtils
- brew tap wix/brew
- brew install applesimutils
- applesimutils --byId $udid --bundle com.dexterous.flutterLocalNotificationsExample --setPermissions notifications=YES
upgrade_script:
- flutter channel stable
- flutter upgrade
install_melos_script:
- dart pub global activate melos
test_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- melos bootstrap
- melos run test:integration