-
Notifications
You must be signed in to change notification settings - Fork 4
/
melos.yaml
169 lines (141 loc) · 4.85 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
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
name: app
packages:
- packages/**
- .
scripts:
decrypt-secrets:
description: Decrypt secrets
run: bash scripts/decrypt-secrets.sh
build_and_test:
description: GA main script
run: bash scripts/build_and_test.sh
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 && dart 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
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
run: melos run analyze_subpackages_custom_lint --no-select && melos run analyze_subpackages --no-select
failFast: true
analyze_subpackages:
description: Analyze a specific package in this project.
exec: flutter analyze .
failFast: true
analyze_subpackages_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
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 test"
concurrency: 1
failFast: true
packageFilters:
flutter: true
dirExists: test
test:integration:
description: Run Flutter teintegration teststs for a specific package in this project.
# TODO(nesquikm): Maybe we should separate integration_test for the app and packages
# because packages may not use flavors at all
exec: "flutter test --flavor production integration_test"
concurrency: 1
failFast: true
packageFilters:
flutter: true
dirExists: integration_test
check-all:
description: Prepare to commit by checking all things
run: melos check-format && melos analyze && melos test && melos test:integration
failFast: true
build:storybook:
description: Build the storybook
run: bash scripts/build-storybook.sh
build:ios_match_assure:
description: Making sure the iOS certificates and profiles are installed
run: bash scripts/ios-match-assure.sh
build:ios_match_new_devices:
description: Registering new devices already added through devportal
run: bash scripts/ios-match-new-devices.sh
build_android_store:
description: Build android store
run: |
bash scripts/build.sh \
--deploy-target android_store \
--build-number auto \
--upload false
deploy_fad_ios:
description: Deploy iOS app to fad
run: |
bash scripts/build.sh \
--deploy-target ios_fad \
--build-number auto \
--upload true
deploy_fad_android:
description: Deploy Android app to fad
run: |
bash scripts/build.sh \
--deploy-target android_fad \
--build-number auto \
--upload true
deploy_fad:
description: Deploy app to fad
run: |
BUILD_NUMBER=$(bash scripts/get-build-number.sh)
bash scripts/build.sh \
--deploy-target ios_fad \
--build-number $BUILD_NUMBER \
--upload true
bash scripts/build.sh \
--deploy-target android_fad \
--build-number $BUILD_NUMBER \
--upload true
deploy_store:
description: Deploy app to store
run: |
BUILD_NUMBER=$(bash scripts/get-build-number.sh)
bash scripts/build.sh \
--deploy-target ios_store \
--build-number $BUILD_NUMBER \
--upload true
bash scripts/build.sh \
--deploy-target android_store \
--build-number $BUILD_NUMBER \
--upload true
command:
clean:
hooks:
post: bash scripts/clean.sh