-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpubspec.yaml
More file actions
193 lines (180 loc) · 5.69 KB
/
Copy pathpubspec.yaml
File metadata and controls
193 lines (180 loc) · 5.69 KB
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: coverde_monorepo
environment:
sdk: ">=3.5.0 <4.0.0"
dev_dependencies:
coverde:
path: packages/coverde_cli
melos: ^7.5.1
pub_score_checker:
path: tools/pub_score_checker
melos:
categories:
tools:
- ./tools/**
e2e:
- "**/e2e"
command:
bootstrap:
environment:
sdk: ">=3.5.0 <4.0.0"
clean:
hooks:
pre:
run: >
melos run --include-private .clean
scripts:
# Clean-up
.clean:
private: true
description: Deep clean-up
run: >
git clean -dfX MELOS_ROOT_PATH
# Code generation
gen:
description: Run code generation for a package
run: >
dart run build_runner build --delete-conflicting-outputs
exec:
concurrency: 1
failFast: true
orderDependents: true
packageFilters:
dependsOn:
- build_runner
gen.all:
description: Run code generation for all packages
steps:
- gen
gen.all.fast:
description: Run code generation for all packages (multi-threaded)
run: >
melos exec --depends-on build_runner --order-dependents -- " dart run
build_runner build --delete-conflicting-outputs "
# Spell checking
spellcheck:
description: Run spell checking for the entire project
run: >
cspell lint --config .cspell/cspell.yaml --no-progress
"MELOS_ROOT_PATH/**"
# Formatting
format:
description: Format a package
run: >
dart format .
format.ci:
description: Format all packages (CI)
run: >
dart format --set-exit-if-changed .
# Analyzing
analyze:
description: Analyze a package
run: >
dart analyze .
analyze.ci:
description: Analyze all packages (CI)
run: >
dart analyze --fatal-infos --fatal-warnings .
# Testing & Coverage
test:
description: Run tests and generate coverage trace file for a package
run: >
dart run coverde optimize-tests --exclude '**/fixtures/**' --include
'test/**_test.dart' --output test/optimized_test.dart && dart test
--color --coverage-path coverage/lcov.info --coverage-package
MELOS_PACKAGE_NAME --exclude-tags ci-only --reporter expanded
--test-randomize-ordering-seed random test/optimized_test.dart
exec:
concurrency: 1
orderDependents: true
packageFilters:
dependsOn:
- test
dirExists:
- test
test.e2e:
description: Run E2E tests
run: >
git clean -dfX . && dart test --run-skipped --tags e2e e2e
packageFilters:
category:
- e2e
dirExists:
- e2e
exec:
concurrency: 1
orderDependents: true
test.all:
description: Run tests for all packages
steps:
- test
test.e2e.all:
description: Run E2E tests for all packages
steps:
- test.e2e
test.ci:
description: Run tests for all packages (CI)
run: >
melos exec --depends-on test --dir-exists test --fail-fast
--order-dependents -- " dart run coverde optimize-tests --exclude
'**/fixtures/**' --include 'test/**_test.dart' --output
test/optimized_test.dart && dart test --coverage-path coverage/lcov.info
--coverage-package MELOS_PACKAGE_NAME --exclude-tags ci-only --reporter
expanded --test-randomize-ordering-seed random test/optimized_test.dart
"
coverage.merge:
description: Merge all packages coverage trace files
run: >
dart run coverde rm --no-dry-run
MELOS_ROOT_PATH/coverage/filtered.lcov.info && melos exec --file-exists
coverage/lcov.info -- " dart run coverde transform --input
coverage/lcov.info --output MELOS_ROOT_PATH/coverage/filtered.lcov.info
--transformations relative=MELOS_ROOT_PATH --transformations
skip-by-glob='**/*.asset.dart' "
coverage.check:
description: Check test coverage
run: >
dart run coverde check --input
MELOS_ROOT_PATH/coverage/filtered.lcov.info 100
coverage.report:
description: Generate HTML coverage report
run: >
dart run coverde report --input
MELOS_ROOT_PATH/coverage/filtered.lcov.info --output
MELOS_ROOT_PATH/coverage/html/
pub-score.remote:
description: Check pub score for a selected package.
run: >
dart run pub_score_checker check_pub_score remote --markdown-output
MELOS_PACKAGE_PATH/.dart_tool/remote_pub_score.md --package-name
MELOS_PACKAGE_NAME --threshold 0
exec:
concurrency: 1
packageFilters:
scope: coverde
pub-score.local:
description: Check pub score for a selected package.
run: >
dart run pub_score_checker check_pub_score local --markdown-output
MELOS_PACKAGE_PATH/.dart_tool/local_pub_score.md --package-path
MELOS_PACKAGE_PATH --threshold 0
exec:
concurrency: 1
packageFilters:
scope: coverde
# Documentation
docs.cli:
description: Resolve CLI README file
run: >
dart run
MELOS_ROOT_PATH/tools/readmes_resolver/lib/resolve_root_readme.dart
--example-dirs=MELOS_ROOT_PATH/packages/coverde_cli/doc/examples/browser/
--example-dirs=MELOS_ROOT_PATH/packages/coverde_cli/doc/examples/terminal/
--example-dirs=MELOS_ROOT_PATH/packages/coverde_cli/doc/examples/markdown/
--readme=MELOS_ROOT_PATH/packages/coverde_cli/README.md
workspace:
- packages/coverde_cli/
- packages/coverde_cli/e2e/
- tools/package_assets_generator/
- tools/package_data_generator/
- tools/pub_score_checker/
- tools/readmes_resolver/