-
Notifications
You must be signed in to change notification settings - Fork 11
/
melos.yaml
137 lines (123 loc) · 5.01 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
name: coverde
packages:
- ./packages/coverde_cli/
- ./packages/package_assets_generator/
- ./packages/package_data_generator/
- ./packages/pub_score_checker/
command:
clean:
hooks:
pre: coverde rm .dart_tool coverage && melos exec -- "coverde rm .dart_tool pubspec_overrides.yaml pubspec.lock coverage"
scripts:
d:
description: Install dependencies for a selected package.
run: dart pub get
exec:
concurrency: 1
failFast: true
orderDependents: true
packageFilters: {}
D:
description: Install dependencies for all packages.
run: melos run d --no-select
D:ci:
description: Install dependencies for all packages.
run: melos exec --fail-fast --order-dependents -- "dart pub get"
g:
description: Run code generation for a selected package.
run: dart pub run build_runner build -d
exec:
concurrency: 1
failFast: true
orderDependents: true
packageFilters:
dependsOn: build_runner
G:
description: Run code generation for all packages.
run: melos run g --no-select
S:
description: Run spell checking for the whole project.
run: cspell lint --fail-fast --no-progress -c ./.cspell/cspell.yaml "MELOS_ROOT_PATH"
f:
description: Format codebase for a selected package.
run: dart format --fix lib test
exec:
concurrency: 1
packageFilters: {}
F:
description: Format codebase for all packages.
run: melos run f --no-select
F:ci:
description: Format codebase for all packages and stop if a change is identified.
run: melos exec --fail-fast -- "dart format --set-exit-if-changed lib test"
a:
description: Analyze codebase for a selected package considering infos and warnings as errors.
run: dart analyze --fatal-infos --fatal-warnings .
exec:
concurrency: 1
packageFilters: {}
A:
description: Analyze codebase for all packages considering infos and warnings as errors.
run: melos run a --no-select
A:ci:
description: Analyze codebase for all packages considering infos and warnings as errors.
run: melos exec --fail-fast --order-dependents -- "dart analyze --fatal-infos --fatal-warnings ."
t:
description: Run tests and generate coverage trace file for a selected package in random order.
run: >
dart test -j 1 -x ci-only --coverage=coverage -r expanded --test-randomize-ordering-seed random --color &&
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib -b MELOS_PACKAGE_PATH
exec:
concurrency: 1
orderDependents: true
packageFilters:
dirExists: test
T:
description: Run tests and generate coverage trace files for all packages in random order.
run: melos run t --no-select
T:ci:
description: Run tests and generate coverage trace files for all packages in random order.
run: melos exec --fail-fast --order-dependents --dir-exists=test -- "dart test -x ci-only --coverage=coverage -r expanded --test-randomize-ordering-seed random && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib -b MELOS_PACKAGE_PATH"
MC:
description: Merge all packages coverage trace files ignoring data related to generated files.
run: >
dart pub global activate --source path MELOS_ROOT_PATH/packages/coverde_cli/ &&
coverde rm MELOS_ROOT_PATH/coverage/filtered.lcov.info &&
melos exec --file-exists=coverage/lcov.info -- "coverde filter --input ./coverage/lcov.info --output MELOS_ROOT_PATH/coverage/filtered.lcov.info --paths-parent MELOS_PACKAGE_PATH --filters '\.asset\.dart'" &&
coverde check -i coverage/filtered.lcov.info 100
R:
description: Generate HTML coverage report.
run: >
dart pub global activate --source path MELOS_ROOT_PATH/packages/coverde_cli/ &&
coverde report --input ./coverage/filtered.lcov.info
FA:
description: Format and analyze.
run: melos run F && melos run A
FA:ci:
description: Format and analyze.
run: melos run F:ci && melos run A:ci
TMC:
description: Run tests, generate unified coverage trace file and check minimum coverage.
run: melos run T && melos run MC
TMC:ci:
description: Run tests, generate unified coverage trace file and check minimum coverage.
run: melos run T:ci && melos run MC
p:
description: Check pub score for a selected package.
run: dart run MELOS_ROOT_PATH/packages/pub_score_checker/main.dart MELOS_PACKAGE_PATH 20
exec:
concurrency: 1
packageFilters:
scope: coverde*
P:
description: Check pub score.
run: melos run p --no-select
P:ci:
description: Check pub score.
run: melos exec --fail-fast --scope="coverde*" -- "dart run MELOS_ROOT_PATH/packages/pub_score_checker/main.dart MELOS_PACKAGE_PATH 20"
WF:
description: Run full local workflow
run: melos run S && melos run FA && melos run TMC && melos run P
WF:ci:
description: Run full CI workflow
run: melos run S && melos run FA:ci && melos run TMC:ci && melos run P:ci