-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
88 lines (75 loc) · 2.81 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
name: bsr
packages:
- packages/**
- .
scripts:
codegen:
description: Generate code for all packages
run: melos run codegen:build_runner --no-select && melos run codegen:locale --no-select
failFast: true
codegen:build_runner:
description: Generate code for all packages using build_runner
# We have to delete all generated by flutter_gen code prior generation because it doesn't
# support incremental generation, nor it supports deleting files that are not needed anymore
exec: 'find . -type f -name "*.gen.dart" -delete && flutter packages pub run build_runner build --delete-conflicting-outputs'
# concurrency set to ONE because we SHOULD generate all code for packages prior we
# started generation for the app
concurrency: 1
failFast: true
packageFilters:
dependsOn: "build_runner"
codegen:locale:
description: Generate localizations code for all packages (easy_localization)
exec: dart run easy_localization:generate --source-dir assets/translations -f keys --output-file locale_keys.g.dart && dart format lib/generated/locale_keys.g.dart
failFast: true
packageFilters:
dependsOn: "easy_localization"
analyze:
description: Analyze all packages and run dart_code_metrics for the main app
run: melos run check-format --no-select && melos run analyze:flutter && melos run analyze:custom_lint --no-select
failFast: true
analyze:flutter:
description: Analyze a specific package in this project.
exec: flutter analyze .
failFast: true
analyze:custom_lint:
description: Analyze a specific package in this project.
exec: dart run custom_lint
failFast: true
packageFilters:
dependsOn: "custom_lint"
check-format:
description: Check the format of a specific package in this project.
exec: dart format --set-exit-if-changed .
failFast: true
test:
description: Run all Dart & Flutter tests in this project.
run: melos run test:dart --no-select && melos run test:flutter --no-select && melos test:integration --no-select
test:dart:
description: Run Dart tests for a specific package in this project.
exec: "dart test test"
concurrency: 1
failFast: true
packageFilters:
flutter: false
dirExists: test
test:flutter:
description: Run Flutter tests for a specific package in this project.
exec: "flutter test -j 1 test"
concurrency: 1
failFast: true
packageFilters:
flutter: true
dirExists: test
test:integration:
description: Run Flutter teintegration teststs for a specific package in this project.
exec: "flutter test --flavor production integration_test"
concurrency: 1
failFast: true
packageFilters:
flutter: true
dirExists: integration_test
command:
clean:
hooks:
post: bash scripts/clean.sh