forked from firebase/flutterfire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
219 lines (194 loc) · 6.09 KB
/
melos.yaml
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: FlutterFire
repository: https://github.com/FirebaseExtended/flutterfire
packages:
- packages/**
- tests
command:
version:
# Generate commit links in package changelogs.
linkToCommits: true
# Only allow versioning to happen on main branch.
branch: master
# Additionally build a changelog at the root of the workspace.
workspaceChangelog: true
scripts:
lint:all:
run: melos run analyze && melos run format
description: Run all static analysis checks.
analyze:
run: |
melos exec -c 5 -- \
dart analyze . --fatal-infos
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
firebase:emulator:
run: |
cd .github/workflows/scripts && ./start-firebase-emulator.sh
description: |
Start the Firebase emulator suite. Used by Functions, Firestore, Auth and Storage
integration testing.
- Requires Node.js and NPM installed.
format:
run: dart pub global run flutter_plugin_tools format
description: |
Build a specific example app for Android.
- Requires `flutter_plugin_tools` (`pub global activate flutter_plugin_tools`).
- Requires `clang-format` (can be installed via Brew on macOS).
build:all:
run: |
melos run build:example_ios_pub --no-select && \
melos run build:example_android_pub --no-select && \
melos run build:example_macos --no-select && \
melos bootstrap
description: Build all example apps.
build:example_android:
run: |
melos exec -c 6 --fail-fast -- \
"flutter build apk --no-pub"
description: Build a specific example app for Android.
select-package:
dir-exists:
- android
scope: "*example*"
# melos bootstrap does not generate all files generated by a build that runs
# `pub get`, and `flutter drive` does not either, so it is still necessary to
# build sometimes without the `--no-pub` switch. Careful: `melos bootstrap` after.
build:example_android_pub:
run: |
melos exec -c 6 --fail-fast -- \
"flutter build apk"
description: Build a specific example app for Android.
select-package:
dir-exists:
- android
scope: "*example*"
build:example_ios:
run: |
melos exec -c 6 --fail-fast -- \
"flutter build ios --no-codesign --no-pub"
description: Build a specific example app for iOS.
select-package:
dir-exists:
- ios
scope: "*example*"
# melos bootstrap does not generate all files generated by a build that runs
# `pub get`, and `flutter drive` does not either, so it is still necessary to
# build sometimes without the `--no-pub` switch. Careful: `melos bootstrap` after.
build:example_ios_pub:
run: |
melos exec -c 6 --fail-fast -- \
"flutter build ios --no-codesign"
description: Build a specific example app for iOS.
select-package:
dir-exists:
- ios
scope: "*example*"
build:example_macos:
run: |
melos exec -c 6 --fail-fast -- \
"flutter build macos --no-pub"
description: |
Build a specific example app for macOS.
select-package:
dir-exists:
- macos
scope: "*example*"
test:all:
run: |
melos run test --no-select && \
melos run test:web --no-select && \
melos run test:e2e --no-select
description: |
Run all tests available.
test:
run: |
melos exec -c 6 --fail-fast -- \
"flutter test --no-pub"
description: Run `flutter test` for a specific package.
select-package:
dir-exists:
- test
ignore:
- "*web*"
- "*odm*"
- "*example*"
test:web:
run: |
melos exec -c 1 --fail-fast -- \
"flutter test --no-pub --platform=chrome"
description: Run `flutter test --platform=chrome` for a specific '*web' package.
select-package:
dir-exists:
- test
scope: "*web*"
test:e2e:
run: |
melos exec -c 1 --fail-fast -- \
"flutter drive --no-pub --target=./test_driver/driver_e2e.dart"
description: |
Run all e2e tests.
select-package:
dir-exists:
- test_driver
scope: "*tests*"
clean:deep:
run: git clean -x -d -f -q
description: Clean things very deeply, can be used to establish "pristine checkout" status.
qualitycheck:
run: |
melos run clean:deep && \
melos clean && \
melos bootstrap && \
melos run lint:all && \
melos run build:all && \
melos run test:all
description: Run all targets generally expected in CI for a full local quality check.
odm:test:
run: |
melos run odm:test:dart &&
melos run odm:test:flutter
description: Run all tests for the ODM.
odm:test:dart:
run: |
melos exec -- \
"dart test"
description: Run Dart tests for the ODM.
select-package:
dir-exists: "test"
depends-on: "test"
scope: "*odm*"
odm:test:flutter:
run: |
melos exec -- \
"flutter test"
description: Run Flutter tests for the ODM.
select-package:
dir-exists: "test"
no-depends-on: "test"
scope: "*odm*"
odm:example_build_runner:build:
run: |
melos exec -- \
"flutter pub run build_runner build --delete-conflicting-outputs"
description: Run a build_runner build in the ODM example app.
select-package:
scope: "*odm_example*"
odm:generator_test_build_runner:build:
run: |
melos exec -c 1 -- \
"dart pub get && flutter pub run build_runner build --delete-conflicting-outputs"
description: Run a build_runner build generator test.
select-package:
scope:
- "*odm_generator_integration*"
odm:example_build_runner:watch:
run: |
melos exec -c 5 -- \
"flutter pub run build_runner watch --delete-conflicting-outputs"
description: Run build_runner watch in the ODM example app.
select-package:
scope: "*odm_example*"
# Additional cleanup lifecycle script, executed when `melos clean` is run.
postclean: >
melos exec -c 6 -- "flutter clean"