forked from ivoleitao/stash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
126 lines (103 loc) · 4.32 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
name: stash
repository: https://github.com/ivoleitao/stash
packages:
- packages/**
ide:
intellij:
false
command:
version:
branch: develop
bootstrap:
hooks:
post: melos generate
scripts:
install:
description: Installs library dependencies
run: melos run install:objectbox
install:objectbox:
run: bash -c 'bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-dart/main/install.sh)'
generate:
description: Run `dart run build_runner --delete-conflicting-outputs` in supporting packages.
run: |
melos exec -c 1 --scope="stash_sqlite" --scope="stash_objectbox" --scope="stash_isar" -- \
"dart run build_runner build --delete-conflicting-outputs"
analyze:
description: Analyze dart and flutter packages in this project
run: melos run analyze:dart && melos run analyze:flutter
analyze:dart:
description: Analyze a dart package in this project
exec: dart analyze . --fatal-infos
packageFilters:
flutter: false
analyze:flutter:
description: Analyze a flutter package in this project
exec: flutter analyze . --fatal-infos
packageFilters:
flutter: true
check-format:
description: Check the format of a package in this project.
exec: dart format --set-exit-if-changed .
format:
description: Format a package in this project.
exec: dart format .
clean:
description: Run `dart run build_runner clean` in the selected packages.
run: |
melos exec -c 1 --scope="stash_sqlite" --scope="stash_objectbox" --scope="stash_isar" -- \
"dart run build_runner clean"
doc:
description: Generate documentation for all packages.
run: |
melos exec -- \
rm -Rf "doc"
melos exec -c 1 -- \
"dart pub global run dartdoc ."
test:
description: Run `dart test` in vm, chrome and flutter in the selected packages
run: melos run test:vm && melos run test:chrome && melos run test:flutter
test:vm:
description: Run `dart test -p vm` in the selected packages.
run: |
melos exec -c 1 --no-flutter --ignore="stash_sembast_web" \
"dart test -p vm"
test:chrome:
description: Run `dart test -p chome` in the selected packages.
run: |
melos exec -c 1 --no-flutter --scope="stash" --scope="stash_memory" --scope="stash_hive" --scope="stash_sembast_web" --scope="stash_dio" \
"dart test -p chrome"
test:flutter:
description: Run `flutter test` in the selected packages.
run: |
melos exec -c 1 --flutter \
"flutter test"
coverage:
description: Run `dart test` in vm and chrome and collects coverage.
run: melos run coverage:vm && melos run coverage:chrome && melos run coverage:flutter
coverage:vm:
description: Run `dart test -p vm` in the selected packages and collects coverage.
run: |
melos exec -c 1 --no-flutter --ignore="stash_sembast_web" \
"dart test -p vm --concurrency=1 --coverage=coverage && dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib"
coverage:chrome:
description: Run `dart test -p chrome` in the selected packages and collects coverage.
run: |
melos exec -c 1 --no-flutter --scope="stash_sembast_web" \
"dart test -p chrome --concurrency=1 --coverage=coverage && dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib"
coverage:flutter:
description: Run `flutter test` in the selected packages and collects coverage.
run: |
melos exec -c 1 --flutter --scope="stash_shared_preferences" --scope="stash_secure_storage" \
"flutter test --concurrency=1 --coverage --coverage-path=coverage/lcov.info && dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib"
verify:
description: Verify package
run: |
melos exec -c 1 --no-flutter --no-private \
"dart pub publish --dry-run"
melos exec -c 1 --flutter --no-private \
"flutter pub publish --dry-run"
codecov:
description: Uploads the code coverage to codecov.
run: |
melos exec -c 1 -- \
"bash -c 'bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F MELOS_PACKAGE_NAME'"