-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathmelos.yaml
139 lines (129 loc) · 3.76 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
name: oidc
repository: https://github.com/Bdaya-Dev/oidc
packages:
- packages/*
- packages/*/example
command:
bootstrap:
runPubGetInParallel: false
clean:
hooks:
post: |
melos exec --flutter -- "flutter clean" &&
rm -rf coverage &&
rm -rf pubspec.lock &&
melos exec --dir-exists coverage -- "rm -rf coverage"
scripts:
pana:
run: melos exec -c 1 "pana"
description: Run pana on all the projects
packageFilters:
noPrivate: true
generate:dart:
run: melos exec -c 1 --depends-on="build_runner" -- "dart run build_runner build --delete-conflicting-outputs"
description: Build all generated files for Dart packages in this project.
analyze: # ------ taken from cfug/dio ------------
description: Analyze all packages
exec: dart analyze
format:
description: Format check all packages
exec: dart format --set-exit-if-changed .
format:fix:
description: Format all packages
exec: dart format .
test:
name: All tests
run: |
melos run test:vm
TEST_PLATFORM=chrome melos run test:web
TEST_PLATFORM=firefox melos run test:web
melos run test:flutter
test:vm:
name: Dart VM tests
exec: |
if [ "$TARGET_DART_SDK" = "min" ]; then
dart test --chain-stack-traces
else
dart test --coverage=coverage/vm --chain-stack-traces
fi
packageFilters:
flutter: false
dirExists: test
ignore:
- "*web*"
test:web:
name: Dart Web tests
run: |
melos run test:web:chrome
melos run test:web:firefox
test:web:chrome:
name: Dart Web tests in chrome
run: melos run test:web:single
env:
TEST_PLATFORM: chrome
WITH_WASM: true
test:web:firefox:
name: Dart Web tests in firefox
run: melos run test:web:single
env:
TEST_PLATFORM: firefox
WITH_WASM: false
test:web:single:
name: Dart Web tests in a browser
exec: |
if [ "$TARGET_DART_SDK" = "min" ]; then
dart test --platform ${TEST_PLATFORM} --chain-stack-traces
else
dart test --platform ${TEST_PLATFORM} --coverage=coverage/${TEST_PLATFORM} --chain-stack-traces
if [ "$WITH_WASM" = "true" ]; then
dart test --platform ${TEST_PLATFORM} --coverage=coverage/${TEST_PLATFORM} --chain-stack-traces --compiler=dart2wasm
fi
fi
packageFilters:
dirExists: test
flutter: false
test:flutter:
name: Flutter tests
exec: flutter test --coverage
packageFilters:
flutter: true
dirExists: test
ignore:
- "*example*"
test:coverage:
name: Run all tests and combine coverage
run: |
melos run test
melos run coverage:format
upgrade:dart:
name: Upgrade Dart package deps
exec: dart pub upgrade
packageFilters:
flutter: false
upgrade:flutter:
name: Upgrade Flutter package deps
exec: flutter pub upgrade
packageFilters:
flutter: true
coverage:clean:
name: Clear coverage
exec: rm -rf coverage
coverage:format:
name: Format coverage
run: |
dart pub global activate coverage
melos run coverage:format:package
coverage:format:package:
name: Format coverage for each package
exec: dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib
packageFilters:
dirExists: coverage
coverage:combine:
name: Combine & convert coverage report
run: |
rm -rf coverage
dart pub global activate combine_coverage
dart pub global activate remove_from_coverage
melos run coverage:format
dart pub global run combine_coverage --repo-path=$pwd
dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$'