forked from brianegan/flutter_architecture_samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
95 lines (92 loc) · 3.16 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
timeout_in: 30m
task:
# this task should fail fast or rely on 'depends_on' for all other tasks
name: Tests (Unit)
container:
image: cirrusci/flutter:latest
pub_cache:
folder: ~/.pub-cache
activate_coverage_script: pub global activate coverage
tests_script: ./scripts/runTests.sh
task:
name: Integration Tests for $app_arch (Linux)
# don't run for PRs
only_if: $CIRRUS_PR == ''
skip: '!changesInclude(".cirrus.yml", "$app_arch/*", "$app_arch/**/*")'
env:
EMULATOR_API_LEVEL: 22
ANDROID_ABI: "default;armeabi-v7a"
matrix:
app_arch: bloc_flutter
app_arch: bloc_library
app_arch: built_redux
app_arch: firestore_redux
app_arch: frideos_library
app_arch: inherited_widget
app_arch: mvc
app_arch: mvi_flutter
app_arch: mvu
app_arch: redurx
app_arch: redux
app_arch: scoped_model
app_arch: simple_bloc_flutter
app_arch: vanilla
container:
image: cirrusci/flutter:latest
allow_failures: $app_arch == "mvu" || $app_arch == "redurx"
pin_emulator_script:
# Download a pinned version of the emulator since upgrades can cause issues
- ${ANDROID_HOME}/emulator/emulator -version
- emulator_version=5264690
- curl -fo emulator.zip "https://dl.google.com/android/repository/emulator-linux-$emulator_version.zip"
- rm -rf "${ANDROID_HOME}/emulator"
- unzip -q emulator.zip -d "${ANDROID_HOME}"
- rm -f emulator.zip
- ${ANDROID_HOME}/emulator/emulator -version
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 -avd test -no-audio -no-window
pub_cache:
folder: ~/.pub-cache
wait_for_emulator_script:
- ./scripts/android-wait-for-emulator.sh
- adb shell input keyevent 82
doctor_script: flutter doctor -v
devices_script: flutter devices
ci_script: ./scripts/ci.sh ./$app_arch || ./scripts/ci.sh ./$app_arch
task:
name: Integration Tests for $app_arch (macOS)
# don't run for PRs
only_if: $CIRRUS_PR == ''
skip: '!changesInclude(".cirrus.yml", "$app_arch/*", "$app_arch/**/*")'
env:
matrix:
app_arch: bloc_flutter
app_arch: bloc_library
app_arch: built_redux
app_arch: firestore_redux
app_arch: frideos_library
app_arch: inherited_widget
app_arch: mvc
app_arch: mvi_flutter
app_arch: mvu
app_arch: redurx
app_arch: redux
app_arch: scoped_model
app_arch: simple_bloc_flutter
app_arch: vanilla
allow_failures: $app_arch == "mvu"
osx_instance:
image: mojave-flutter
simulator_script:
- xcrun simctl list devicetypes
- xcrun simctl list runtimes
# create simulator
- udid=$(xcrun simctl create "iPhone X" com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-12-0)
# boot simulator
- xcrun simctl boot $udid
doctor_script: flutter doctor -v
devices_script: flutter devices
ci_script: ./scripts/ci.sh ./$app_arch || ./scripts/ci.sh ./$app_arch