-
Notifications
You must be signed in to change notification settings - Fork 6
/
melos.yaml
113 lines (101 loc) · 4.2 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
name: catalyst_voices
repository: https://github.com/input-output-hk/catalyst-voices
packages:
- catalyst_voices
- catalyst_voices/uikit_example
- catalyst_voices/packages/**
- catalyst_voices_packages/**
- utilities/**
command:
version:
linkToCommits: true
workspaceChangelog: true
bootstrap:
runPubGetInParallel: true
environment:
sdk: ">=3.5.0 <4.0.0"
flutter: ">=3.24.1"
dependencies:
asn1lib: ^1.5.3
bip39: ^1.0.6
bloc_concurrency: ^0.2.2
collection: ^1.18.0
cryptography: ^2.7.0
equatable: ^2.0.5
flutter_bloc: ^8.1.5
flutter_localized_locales: ^2.0.5
flutter_quill: ^10.5.13
flutter_quill_extensions: ^10.5.13
flutter_secure_storage: ^9.2.2
formz: ^0.7.0
intl: ^0.19.0
logging: ^1.2.0
meta: ^1.10.0
result_type: ^0.2.0
password_strength: ^0.2.0
plugin_platform_interface: ^2.1.7
bech32: ^0.2.2
bip32_ed25519: ^0.6.0
cbor: ^6.2.0
convert: ^3.1.1
pinenacl: ^0.6.0
ulid: ^2.0.0
sentry_flutter: ^8.8.0
# TODO(dtscalac): win32 dependency is just a transitive dependency and shouldn't be imported
# but here we import it explicitly to make sure the latest version is used which addresses
# the problem from here: https://github.com/jonataslaw/get_cli/issues/263
win32: ^5.5.4
web: ^1.0.0
dev_dependencies:
test: ^1.24.9
build_runner: ^2.4.12
mocktail: ^1.0.1
scripts:
metrics:
run: |
melos exec -c 1 -- \
flutter pub run dart_code_metrics:metrics analyze
description: |
Run `dart_code_metrics` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
format-apply:
run: |
melos exec -c 1 --dir-exists="lib" -- "find . -name "*.dart" ! -name "*.g.dart" ! -path '*/generated/*' | tr '\n' ' ' | xargs dart format --fix" &&
melos exec -c 1 --dir-exists="test" -- "find . -name "*.dart" ! -name "*.g.dart" ! -path '*/generated/*' | tr '\n' ' ' | xargs dart format --fix" &&
melos exec -c 1 --dir-exists="integration_test" -- "find . -name "*.dart" ! -name "*.g.dart" ! -path '*/generated/*' | tr '\n' ' ' | xargs dart format --fix"
description: Run `dart format` for all packages.
format-check:
run: |
melos exec -c 1 --dir-exists="lib" -- "find . -name "*.dart" ! -name "*.g.dart" ! -path '*/generated/*' | tr '\n' ' ' | xargs dart format --output none --set-exit-if-changed" &&
melos exec -c 1 --dir-exists="test" -- "find . -name "*.dart" ! -name "*.g.dart" ! -path '*/generated/*' | tr '\n' ' ' | xargs dart format --output none --set-exit-if-changed" &&
melos exec -c 1 --dir-exists="integration_test" -- "find . -name "*.dart" ! -name "*.g.dart" ! -path '*/generated/*' | tr '\n' ' ' | xargs dart format --output none --set-exit-if-changed"
description: Run `dart format` checks for all packages.
test:select:
run: |
melos exec -c 1 --dir-exists="test" -- flutter test
description: Run `flutter test` for selected packages.
test:
run: |
melos run test:select --no-select
description: Run `flutter test` for all packages.
test-report:
run: |
# cleanup from previous build and create new folders
rm -fR $MELOS_ROOT_PATH/test_reports
mkdir $MELOS_ROOT_PATH/test_reports
# run tests, generate junit reports in /test_reports/ & code coverage report
melos exec -c 1 --dir-exists="test" -- \
"flutter test --reporter expanded --coverage --machine | tojunit --output $MELOS_ROOT_PATH/test_reports/MELOS_PACKAGE_NAME.junit-report.xml"
# removes code coverage for generated code
melos exec -c 1 --dir-exists="test" -- \
lcov --remove coverage/lcov.info -o coverage/lcov.info --ignore-errors unused,unused \
'*.swagger.dart' \
'*.chopper.dart' \
'*.g.dart' \
'*.freezed.dart' \
'lib/generated/**'
dart pub global run combine_coverage --repo-path=.
description: |
Run `flutter test` for all packages and generate junit and coverage reports.
The test reports are saved in /test_reports folder.
The coverages are saved for each package separately in /coverage folder.