-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmelos.yaml
86 lines (72 loc) · 2.41 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
name: deposit
repository: https://github.com/bluefireteam/deposit
packages:
- packages/**
command:
version:
# Generate commit links in package changelogs.
linkToCommits: true
# Only allow versioning to happen on main branch.
branch: main
# Additionally build a changelog at the root of the workspace.
workspaceChangelog: true
scripts:
pub:
run: melos exec -c 10 flutter pub get
description: Run all static analysis checks.
lint:all:
run: melos run analyze && melos run format
description: Run all static analysis checks.
analyze:
run: |
melos exec -c 10 flutter analyze --fatal-infos
select-package:
file-exists:
- analysis_options.yaml
description: Run `dart analyze` for all packages.
format:
run: melos exec flutter format .
description: Run `dart format` for all packages.
format:ci:
run: melos exec dart flutter --set-exit-if-changed .
description: Run `dart format` for all packages and set exit if it is incorrectly formatted.
dartdoc:
run: |
melos exec rm -rf doc/
melos exec dartdoc --no-auto-include-dependencies --quiet
select-package:
file-exists:
- dartdoc_options.yaml
description: Run `dartdoc` for all packages.
test:
run: melos run test:select --no-select
description: Run all Dart tests in this project.
test:select:
run: melos exec flutter test
select-package:
dir-exists:
- test
description: Run `flutter test` for selected packages.
test:coverage:
run: |
rm -rf ./coverage/
if ! melos exec flutter test --coverage --coverage-path ../../coverage/\$MELOS_PACKAGE_NAME.info; then
exit 1
fi
tracefiles=""
for file in ./coverage/*.info; do
fileName=$(basename -s .info $file)
result=$(sed "s|^SF:|SF:packages/$fileName/|g" $file)
echo "$result" > $file
tracefiles="$tracefiles --add-tracefile $file"
done
lcov $(echo $tracefiles) --output-file coverage/lcov_combined.info;
lcov --list coverage/lcov_combined.info
select-package:
dir-exists: test
description: Generate LCOV coverage for all the packages as a single LCOV file.
test:coverage:html:
run: |
melos run test:coverage --no-select
genhtml coverage/lcov_combined.info -o coverage/html
description: Generate LCOV coverage for all the packages as a single LCOV file.