-
Notifications
You must be signed in to change notification settings - Fork 2
/
melos.yaml
96 lines (84 loc) · 3.78 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
name: deta-dart
packages:
- packages/**
# This configuration is a modification of the `coverde` repository,
# you can see the original here -> https://github.com/mrverdant13/coverde/blob/main/melos.yaml
scripts:
d:
description: Install dependencies for a selected package.
run: melos exec -c 1 -- dart pub get
select-package:
D:
description: Install dependencies for all packages.
run: melos run d --no-select
D:ci:
description: Install dependencies for all packages.
run: melos exec -- dart pub get
g:
description: Run code generation for a selected package.
run: melos exec -c 1 -- dart pub run build_runner build --delete-conflicting-outputs
select-package:
depends-on: build_runner
G:
description: Run code generation for all packages.
run: melos run g --no-select
f:
description: Format codebase for a selected package.
run: melos exec -c 1 -- dart format --fix lib test
select-package:
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: melos exec -c 1 -- dart analyze --fatal-infos --fatal-warnings .
select-package:
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 -- dart analyze --fatal-infos --fatal-warnings .
t:
description: Run tests and generate coverage tracefile for a selected package in random order.
run: melos exec -c 1 -- "dart test -x ci-only --coverage=coverage -r expanded --test-randomize-ordering-seed random --color && format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.packages --report-on=lib"
select-package:
dir-exists: test
T:
description: Run tests and generate coverage tracefiles for all packages in random order.
run: melos run t --no-select
T:ci:
description: Run tests and generate coverage tracefiles for all packages in random order.
run: melos exec --fail-fast --dir-exists=test -- "dart test -x ci-only --coverage=coverage -r expanded --test-randomize-ordering-seed random && format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.packages --report-on=lib"
MC:
description: Merge all packages coverage tracefiles ignoring data related to generated files.
run: >
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 --filters \.asset\.dart
CH:
description: Check minimum coverage
run: coverde check -i coverage/filtered.lcov.info 100
RO:
description: Generate HTML coverage report and open in the browers.
run: coverde report --input ./coverage/filtered.lcov.info -l
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 && melos run CH
TMC:ci:
description: Run tests, generate unified coverage trace file and check minimum coverage.
run: melos run T:ci && melos run MC && melos run CH
WF:
description: Run full local workflow
run: melos run FA && melos run TMC
WF:ci:
description: Run full CI workflow
run: melos run FA:ci && melos run TMC:ci