-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
152 lines (116 loc) · 3.53 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
name: pl_plugins
packages:
- apps/**
- packages/**
- '*'
command:
version:
workspaceChangelog: false
scripts:
lint:all:
run: melos run analyze && melos run format
description: |
Run all static analysis checks
- Analyze the project for Dart analysis issues.
- Requires `pub global activate tuneup`.
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.
# BUILD
build:all:
run: |
melos bootstrap
melos run build:example_android_pub --no-select
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.
packageFilters:
dirExists:
- android
scope: "*example*"
build:example_android_pub:
run: |
melos exec -c 6 --fail-fast -- \
"flutter build apk"
description: Build a specific example app for Android.
packageFilters:
dirExists:
- android
scope: "*example*"
# RUN
run:all:
run: |
melos bootstrap
melos run run:example_android_pub --no-select
description: Run all example apps
run:example_android:
run: |
melos exec -c 6 --fail-fast -- \
"flutter run --no-pub"
description: Run a specific example app for Android.
packageFilters:
dirExists:
- android
scope: "*example*"
run:example_android_pub:
run: |
melos exec -c 6 --fail-fast -- \
"flutter run"
description: Run a specific example app for Android.
packageFilters:
dirExists:
- android
scope: "*example*"
# TEST
test:all:
run: melos run test --no-select && melos run test:mobile_e2e --no-select
description: Run all tests available on stable channel
test:unit_all:
run: melos run test --no-select
description: Run all tests available on stable channel
test:
run: |
melos exec -c 6 --fail-fast -- \
"flutter test --no-pub"
description: Run `flutter test` for a specific package.
packageFilters:
dirExists:
- test
ignore:
- "*web*"
- "*example*"
test:mobile_e2e:
run: |
melos exec -c 1 --fail-fast -- \
"flutter test ./integration_test/MELOS_PARENT_PACKAGE_NAME_test.dart"
description: |
Run all Android or iOS test driver e2e tests in a specific example app.
- Requires an Android emulator or iOS simulator.
packageFilters:
dirExists:
- integration_test
scope: "*example*"
# Coverage
coverage: >
melos exec -c 1 --fail-fast --dir-exists=test --ignore="*example*" --ignore="*web*" -- \
flutter test --coverage
# Check pubspecs are valid and publishable in each package.
lint:pub: >
melos exec -c 5 --fail-fast --no-private --ignore="*example*" -- \
pub publish --dry-run
# Clean things very deeply, can be used to establish "pristine checkout" status
clean:deep: >
git clean -x -d -f -q
# Run all targets generally expected in CI for a full local quality check
qualitycheck: >
melos run clean:deep && melos clean && melos bootstrap && melos run lint:all && melos run build:all && melos run test:all
# Additional cleanup lifecycle script, executed when `melos clean` is ran.
postclean: >
melos exec -c 6 -- "flutter clean"