forked from fluttercommunity/flutter_uploader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
94 lines (89 loc) · 3.18 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
code_style_task:
container:
dockerfile: .ci/Dockerfile
cpu: 1
memory: 2G
# upgrade_script:
# - flutter channel master
# - flutter upgrade
# - git fetch origin master
# activate_script: pub global activate flutter_plugin_tools
matrix:
- name: publishable
test_script:
- flutter pub publish -n
- name: test
test_script:
- flutter test
- name: dartfmt
test_script:
- dartfmt -w .
- git diff --quiet || (git diff && exit 1)
- name: format
format_script: script/format.sh
- name: analyze
script:
- pub global activate tuneup
- flutter packages get
- pub global run tuneup check
android_task:
container:
dockerfile: .ci/Dockerfile
cpu: 3
memory: 4G
build_script:
- cd example && flutter build apk --release
backend_task:
container:
image: node:latest
node_modules_cache:
folder: example/backend/functions/node_modules
fingerprint_script: cat example/backend/functions/package-lock.json
populate_script: cd example/backend/functions && npm ci
test_script: cd example/backend/functions && npm run-script lint
connected_check_task:
name: Flutter driver test on Android
only_if: $CIRRUS_BRANCH == "master" || CIRRUS_PR != ""
env:
API_LEVEL: 29
TARGET: default
ARCH: x86_64
container:
dockerfile: .ci/Dockerfile
cpu: 4
memory: 8G
kvm: true
create_device_script:
- echo no | avdmanager create avd --force --name "api-${API_LEVEL}" --abi "${TARGET}/${ARCH}" --package "system-images;android-${API_LEVEL};${TARGET};${ARCH}"
start_emulator_background_script:
- $ANDROID_HOME/emulator/emulator -avd "api-${API_LEVEL}" -no-window -gpu off -no-snapshot -noaudio -no-boot-anim -camera-back none -show-kernel -verbose -debug all
# - $ANDROID_HOME/emulator/emulator -avd "api-${API_LEVEL}" -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -show-kernel -verbose -debug all
wait_for_emulator_script:
- adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 3; done; input keyevent 82'
disable_animations_script:
- adb shell settings put global window_animation_scale 0.0
- adb shell settings put global transition_animation_scale 0.0
- adb shell settings put global animator_duration_scale 0.0
run_instrumented_tests_script:
- adb devices
- cd example
- flutter build apk --debug
- flutter drive --driver=test_driver/integration_test.dart integration_test/flutter_uploader_test.dart
ios_task:
osx_instance:
image: catalina-flutter
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-14-2 | xargs xcrun simctl boot
install_swiftlint_script:
- brew install swiftlint
test_script:
- flutter channel beta
- flutter upgrade
- flutter test
build_script:
- pod repo update
- cd example && flutter build ios --release --no-codesign
run_instrumented_tests_script:
- cd example
- flutter drive --driver=test_driver/integration_test.dart integration_test/flutter_uploader_test.dart