-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
melos.yaml
93 lines (77 loc) · 3.11 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
name: Nitrite
repository: https://github.com/nitrite/nitrite-flutter
packages:
- packages/**
- examples/**
- doc/**
ignore:
- packages/**/build/**
- examples/**/build/**
command:
version:
# Generate commit links in package changelogs.
linkToCommits: true
# Only allow versioning to happen on release branch.
branch: release
# Additionally build a changelog at the root of the workspace.
workspaceChangelog: true
bootstrap:
runPubGetInParallel: false
scripts:
generate:
run: |
melos exec -- dart run build_runner build --delete-conflicting-outputs
description: Run `build_runner` for all package.
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
description: Run `flutter analyze` for all packages.
format:
run: melos exec dart format . --fix
description: Run `dart format` for all packages.
dartdoc:
run: melos exec dart doc .
description: Run dartdoc checks for all packages.
upgrade:
run: melos exec -- flutter pub upgrade
description: Run `flutter pub upgrade` for all packages.
test:
run: |
melos run test-with-coverage --no-select
description: |
Run all tests available with coverage.
test:without-coverage:
run: |
melos run test-without-coverage --no-select
description: |
Run all tests available without coverage
test-with-coverage:
run: >
melos run generate &&
melos exec -c 6 --fail-fast --ignore="*generator*" --ignore="*demo*" -- flutter test --coverage --no-pub &&
melos exec -c 6 --fail-fast --scope="*generator*" -- dart pub global run coverage:test_with_coverage &&
melos exec -c 1 --file-exists=coverage/lcov.info --scope="nitrite" -- lcov --ignore-errors unused --remove coverage/lcov.info "lib/src/migration/*" "lib/src/transaction/*" "lib/src/index/fulltext/stop_words.dart" &&
melos exec --ignore="*demo*" -- genhtml coverage/lcov.info --output-directory=coverage/ &&
melos exec -c 1 --file-exists=coverage/lcov.info -- coverde filter --input ./coverage/lcov.info --output MELOS_ROOT_PATH/coverage/filtered.lcov.info --filters \.g\.dart &&
coverde value -i coverage/filtered.lcov.info > MELOS_ROOT_PATH/coverage/result.txt
description: Run `flutter test` for a specific package with coverage.
test-without-coverage:
run: >
melos run generate &&
melos exec -c 6 --fail-fast --ignore="*generator*" --ignore="*demo*" -- flutter test --no-pub &&
melos exec -c 6 --fail-fast --scope="*generator*" -- dart test
description: Run `flutter test` for a specific package without coverage.
clean:deep:
run: git clean -x -d -f -q
description: Clean things very deeply, can be used to establish "pristine checkout" status.
clean:
run: melos exec -- flutter clean
description: Run `flutter clean` for all packages.
publish:
run: |
melos run generate &&
melos exec --ignore="*demo*" -- dart pub publish --force
description: Run `flutter pub publish` for all packages.