-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmelos.yaml
90 lines (76 loc) · 2.26 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
name: leto
repository: https://github.com/juancastillo0/leto
packages:
[
"*",
"leto/*",
"leto_schema/*",
"leto_generator/*",
"leto_generator/example/*",
"leto_shelf/*",
"leto_shelf/example/*",
"chat_example/*",
"chat_example/server/*",
]
command:
bootstrap:
usePubspecOverrides: true
scripts:
pub_get:all:
run: melos exec -c 5 -- \
dart pub get
upgrade:all:
run: melos exec -c 5 -- \
dart pub upgrade
lint:all:
run: melos run analyze && melos run format
description: |
Run all static analysis checks
- Analyze the project for Dart analysis issues.
analyze:
run: |
melos exec -c 5 -- \
flutter analyze . --no-fatal-infos --no-pub
description: |
Run `flutter analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
format:
run: |
melos exec -c 5 -- \
dart format .
description: |
Runs `dart format` in all packages.
build_runner:
run: |
melos exec -c 1 --depends-on=build_runner \
dart pub run build_runner build --delete-conflicting-outputs
description: |
Runs code generation `build_runner build` in all packages.
test:all:
run: melos run test --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
# Coverage
coverage: >
melos exec -c 1 --fail-fast --dir-exists=test --ignore="*example*" -- \
flutter test --coverage --no-pub
# 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 test:all
# Additional cleanup lifecycle script, executed when `melos clean` is ran.
postclean: >
melos exec -c 6 -- "flutter clean"